@@ -61,10 +61,10 @@ impl MultiItemModifier for BuiltinDerive {
6161}
6262
6363macro_rules! derive_traits {
64- ( $( [ $deprecation: expr] $name: expr => $func: path, ) +) => {
64+ ( $( [ $deprecation: expr] $name: ident => $func: path, ) +) => {
6565 pub fn is_builtin_trait( name: ast:: Name ) -> bool {
66- match & * name. as_str ( ) {
67- $( $name ) |+ => true ,
66+ match name {
67+ $( sym :: $name ) |+ => true ,
6868 _ => false ,
6969 }
7070 }
@@ -80,7 +80,7 @@ macro_rules! derive_traits {
8080
8181 $(
8282 resolver. add_builtin(
83- ast:: Ident :: with_empty_ctxt( Symbol :: intern ( $name) ) ,
83+ ast:: Ident :: with_empty_ctxt( sym :: $name) ,
8484 Lrc :: new( SyntaxExtension {
8585 deprecation: $deprecation. map( |msg| Deprecation {
8686 since: Some ( Symbol :: intern( "1.0.0" ) ) ,
@@ -100,40 +100,40 @@ macro_rules! derive_traits {
100100
101101derive_traits ! {
102102 [ None ]
103- " Clone" => clone:: expand_deriving_clone,
103+ Clone => clone:: expand_deriving_clone,
104104
105105 [ None ]
106- " Hash" => hash:: expand_deriving_hash,
106+ Hash => hash:: expand_deriving_hash,
107107
108108 [ None ]
109- " RustcEncodable" => encodable:: expand_deriving_rustc_encodable,
109+ RustcEncodable => encodable:: expand_deriving_rustc_encodable,
110110
111111 [ None ]
112- " RustcDecodable" => decodable:: expand_deriving_rustc_decodable,
112+ RustcDecodable => decodable:: expand_deriving_rustc_decodable,
113113
114114 [ None ]
115- " PartialEq" => partial_eq:: expand_deriving_partial_eq,
115+ PartialEq => partial_eq:: expand_deriving_partial_eq,
116116 [ None ]
117- "Eq" => eq:: expand_deriving_eq,
117+ Eq => eq:: expand_deriving_eq,
118118 [ None ]
119- " PartialOrd" => partial_ord:: expand_deriving_partial_ord,
119+ PartialOrd => partial_ord:: expand_deriving_partial_ord,
120120 [ None ]
121- " Ord" => ord:: expand_deriving_ord,
121+ Ord => ord:: expand_deriving_ord,
122122
123123 [ None ]
124- " Debug" => debug:: expand_deriving_debug,
124+ Debug => debug:: expand_deriving_debug,
125125
126126 [ None ]
127- " Default" => default :: expand_deriving_default,
127+ Default => default :: expand_deriving_default,
128128
129129 [ None ]
130- " Copy" => bounds:: expand_deriving_copy,
130+ Copy => bounds:: expand_deriving_copy,
131131
132132 // deprecated
133133 [ Some ( "derive(Encodable) is deprecated in favor of derive(RustcEncodable)" ) ]
134- " Encodable" => encodable:: expand_deriving_encodable,
134+ Encodable => encodable:: expand_deriving_encodable,
135135 [ Some ( "derive(Decodable) is deprecated in favor of derive(RustcDecodable)" ) ]
136- " Decodable" => decodable:: expand_deriving_decodable,
136+ Decodable => decodable:: expand_deriving_decodable,
137137}
138138
139139/// Construct a name for the inner type parameter that can't collide with any type parameters of
0 commit comments