Skip to content

Commit 4dcf9b1

Browse files
committed
hygiene: Remove some unused impls
1 parent 3eafaae commit 4dcf9b1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/libsyntax_pos/hygiene.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ use rustc_data_structures::sync::Lrc;
3636
use std::fmt;
3737

3838
/// A SyntaxContext represents a chain of macro expansions (represented by marks).
39-
#[derive(Clone, Copy, PartialEq, Eq, Default, PartialOrd, Ord, Hash)]
39+
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
4040
pub struct SyntaxContext(u32);
4141

42-
#[derive(Copy, Clone, Debug)]
42+
#[derive(Debug)]
4343
struct SyntaxContextData {
4444
outer_mark: Mark,
4545
transparency: Transparency,
@@ -53,10 +53,10 @@ struct SyntaxContextData {
5353
}
5454

5555
/// A mark is a unique ID associated with a macro expansion.
56-
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable)]
56+
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
5757
pub struct Mark(u32);
5858

59-
#[derive(Clone, Debug)]
59+
#[derive(Debug)]
6060
struct MarkData {
6161
parent: Mark,
6262
expn_info: Option<ExpnInfo>,
@@ -614,7 +614,7 @@ impl fmt::Debug for SyntaxContext {
614614
}
615615

616616
/// Extra information for tracking spans of macro and syntax sugar expansion
617-
#[derive(Clone, Hash, Debug, RustcEncodable, RustcDecodable)]
617+
#[derive(Clone, Debug, RustcEncodable, RustcDecodable)]
618618
pub struct ExpnInfo {
619619
// --- The part unique to each expansion.
620620
/// The location of the actual macro invocation or syntax sugar , e.g.
@@ -676,7 +676,7 @@ impl ExpnInfo {
676676
}
677677

678678
/// The source of expansion.
679-
#[derive(Clone, Hash, Debug, PartialEq, Eq, RustcEncodable, RustcDecodable)]
679+
#[derive(Clone, Debug, RustcEncodable, RustcDecodable)]
680680
pub enum ExpnKind {
681681
/// e.g., #[derive(...)] <item>
682682
MacroAttribute(Symbol),
@@ -724,7 +724,7 @@ impl MacroKind {
724724
}
725725

726726
/// The kind of compiler desugaring.
727-
#[derive(Clone, Copy, Hash, Debug, PartialEq, Eq, RustcEncodable, RustcDecodable)]
727+
#[derive(Clone, Copy, PartialEq, Debug, RustcEncodable, RustcDecodable)]
728728
pub enum DesugaringKind {
729729
/// We desugar `if c { i } else { e }` to `match $ExprKind::Use(c) { true => i, _ => e }`.
730730
/// However, we do not want to blame `c` for unreachability but rather say that `i`

0 commit comments

Comments
 (0)