@@ -92,7 +92,7 @@ fn decodable_substructure(
92
92
Named ( ref fields) => fields. len ( ) ,
93
93
} ;
94
94
let fn_read_struct_field_path: Vec < _ > =
95
- cx. def_site_path ( & [ sym:: rustc_serialize, sym:: Decodable , sym:: read_struct_field] ) ;
95
+ cx. def_site_path ( & [ sym:: rustc_serialize, sym:: Decoder , sym:: read_struct_field] ) ;
96
96
97
97
let path = cx. path_ident ( trait_span, substr. type_ident ) ;
98
98
let result =
@@ -113,7 +113,7 @@ fn decodable_substructure(
113
113
} ) ;
114
114
let result = cx. expr_ok ( trait_span, result) ;
115
115
let fn_read_struct_path: Vec < _ > =
116
- cx. def_site_path ( & [ sym:: rustc_serialize, sym:: Decodable , sym:: read_struct] ) ;
116
+ cx. def_site_path ( & [ sym:: rustc_serialize, sym:: Decoder , sym:: read_struct] ) ;
117
117
118
118
cx. expr_call_global (
119
119
trait_span,
@@ -132,11 +132,8 @@ fn decodable_substructure(
132
132
let mut arms = Vec :: with_capacity ( fields. len ( ) + 1 ) ;
133
133
let mut variants = Vec :: with_capacity ( fields. len ( ) ) ;
134
134
135
- let fn_read_enum_variant_arg_path: Vec < _ > = cx. def_site_path ( & [
136
- sym:: rustc_serialize,
137
- sym:: Decodable ,
138
- sym:: read_enum_variant_arg,
139
- ] ) ;
135
+ let fn_read_enum_variant_arg_path: Vec < _ > =
136
+ cx. def_site_path ( & [ sym:: rustc_serialize, sym:: Decoder , sym:: read_enum_variant_arg] ) ;
140
137
141
138
for ( i, & ( ident, v_span, ref parts) ) in fields. iter ( ) . enumerate ( ) {
142
139
variants. push ( cx. expr_str ( v_span, ident. name ) ) ;
@@ -168,14 +165,14 @@ fn decodable_substructure(
168
165
let variant_vec = cx. expr_vec ( trait_span, variants) ;
169
166
let variant_vec = cx. expr_addr_of ( trait_span, variant_vec) ;
170
167
let fn_read_enum_variant_path: Vec < _ > =
171
- cx. def_site_path ( & [ sym:: rustc_serialize, sym:: Decodable , sym:: read_enum_variant] ) ;
168
+ cx. def_site_path ( & [ sym:: rustc_serialize, sym:: Decoder , sym:: read_enum_variant] ) ;
172
169
let result = cx. expr_call_global (
173
170
trait_span,
174
171
fn_read_enum_variant_path,
175
172
vec ! [ blkdecoder, variant_vec, lambda] ,
176
173
) ;
177
174
let fn_read_enum_path: Vec < _ > =
178
- cx. def_site_path ( & [ sym:: rustc_serialize, sym:: Decodable , sym:: read_enum] ) ;
175
+ cx. def_site_path ( & [ sym:: rustc_serialize, sym:: Decoder , sym:: read_enum] ) ;
179
176
180
177
cx. expr_call_global (
181
178
trait_span,
0 commit comments