@@ -40,64 +40,64 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
40
40
fn stability ( & self , def : DefId ) -> Option < attr:: Stability >
41
41
{
42
42
let cdata = self . get_crate_data ( def. krate ) ;
43
- decoder:: get_stability ( & * cdata, def. index )
43
+ decoder:: get_stability ( & cdata, def. index )
44
44
}
45
45
46
46
fn deprecation ( & self , def : DefId ) -> Option < attr:: Deprecation >
47
47
{
48
48
let cdata = self . get_crate_data ( def. krate ) ;
49
- decoder:: get_deprecation ( & * cdata, def. index )
49
+ decoder:: get_deprecation ( & cdata, def. index )
50
50
}
51
51
52
52
fn closure_kind ( & self , _tcx : & ty:: ctxt < ' tcx > , def_id : DefId ) -> ty:: ClosureKind
53
53
{
54
54
assert ! ( !def_id. is_local( ) ) ;
55
55
let cdata = self . get_crate_data ( def_id. krate ) ;
56
- decoder:: closure_kind ( & * cdata, def_id. index )
56
+ decoder:: closure_kind ( & cdata, def_id. index )
57
57
}
58
58
59
59
fn closure_ty ( & self , tcx : & ty:: ctxt < ' tcx > , def_id : DefId ) -> ty:: ClosureTy < ' tcx >
60
60
{
61
61
assert ! ( !def_id. is_local( ) ) ;
62
62
let cdata = self . get_crate_data ( def_id. krate ) ;
63
- decoder:: closure_ty ( & * cdata, def_id. index , tcx)
63
+ decoder:: closure_ty ( & cdata, def_id. index , tcx)
64
64
}
65
65
66
66
fn item_variances ( & self , def : DefId ) -> ty:: ItemVariances {
67
67
let cdata = self . get_crate_data ( def. krate ) ;
68
- decoder:: get_item_variances ( & * cdata, def. index )
68
+ decoder:: get_item_variances ( & cdata, def. index )
69
69
}
70
70
71
71
fn repr_attrs ( & self , def : DefId ) -> Vec < attr:: ReprAttr > {
72
72
let cdata = self . get_crate_data ( def. krate ) ;
73
- decoder:: get_repr_attrs ( & * cdata, def. index )
73
+ decoder:: get_repr_attrs ( & cdata, def. index )
74
74
}
75
75
76
76
fn item_type ( & self , tcx : & ty:: ctxt < ' tcx > , def : DefId )
77
77
-> ty:: TypeScheme < ' tcx >
78
78
{
79
79
let cdata = self . get_crate_data ( def. krate ) ;
80
- decoder:: get_type ( & * cdata, def. index , tcx)
80
+ decoder:: get_type ( & cdata, def. index , tcx)
81
81
}
82
82
83
83
fn item_predicates ( & self , tcx : & ty:: ctxt < ' tcx > , def : DefId )
84
84
-> ty:: GenericPredicates < ' tcx >
85
85
{
86
86
let cdata = self . get_crate_data ( def. krate ) ;
87
- decoder:: get_predicates ( & * cdata, def. index , tcx)
87
+ decoder:: get_predicates ( & cdata, def. index , tcx)
88
88
}
89
89
90
90
fn item_super_predicates ( & self , tcx : & ty:: ctxt < ' tcx > , def : DefId )
91
91
-> ty:: GenericPredicates < ' tcx >
92
92
{
93
93
let cdata = self . get_crate_data ( def. krate ) ;
94
- decoder:: get_super_predicates ( & * cdata, def. index , tcx)
94
+ decoder:: get_super_predicates ( & cdata, def. index , tcx)
95
95
}
96
96
97
97
fn item_attrs ( & self , def_id : DefId ) -> Vec < ast:: Attribute >
98
98
{
99
99
let cdata = self . get_crate_data ( def_id. krate ) ;
100
- decoder:: get_item_attrs ( & * cdata, def_id. index )
100
+ decoder:: get_item_attrs ( & cdata, def_id. index )
101
101
}
102
102
103
103
fn item_symbol ( & self , def : DefId ) -> String
@@ -109,13 +109,13 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
109
109
fn trait_def ( & self , tcx : & ty:: ctxt < ' tcx > , def : DefId ) -> ty:: TraitDef < ' tcx >
110
110
{
111
111
let cdata = self . get_crate_data ( def. krate ) ;
112
- decoder:: get_trait_def ( & * cdata, def. index , tcx)
112
+ decoder:: get_trait_def ( & cdata, def. index , tcx)
113
113
}
114
114
115
115
fn adt_def ( & self , tcx : & ty:: ctxt < ' tcx > , def : DefId ) -> ty:: AdtDefMaster < ' tcx >
116
116
{
117
117
let cdata = self . get_crate_data ( def. krate ) ;
118
- decoder:: get_adt_def ( & self . intr , & * cdata, def. index , tcx)
118
+ decoder:: get_adt_def ( & self . intr , & cdata, def. index , tcx)
119
119
}
120
120
121
121
fn method_arg_names ( & self , did : DefId ) -> Vec < String >
@@ -126,7 +126,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
126
126
127
127
fn item_path ( & self , def : DefId ) -> Vec < hir_map:: PathElem > {
128
128
let cdata = self . get_crate_data ( def. krate ) ;
129
- let path = decoder:: get_item_path ( & * cdata, def. index ) ;
129
+ let path = decoder:: get_item_path ( & cdata, def. index ) ;
130
130
131
131
cdata. with_local_path ( |cpath| {
132
132
let mut r = Vec :: with_capacity ( cpath. len ( ) + path. len ( ) ) ;
@@ -138,7 +138,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
138
138
139
139
fn extern_item_path ( & self , def : DefId ) -> Vec < hir_map:: PathElem > {
140
140
let cdata = self . get_crate_data ( def. krate ) ;
141
- let path = decoder:: get_item_path ( & * cdata, def. index ) ;
141
+ let path = decoder:: get_item_path ( & cdata, def. index ) ;
142
142
143
143
let mut r = Vec :: with_capacity ( path. len ( ) + 1 ) ;
144
144
let crate_name = hir_map:: PathMod ( token:: intern ( & cdata. name ) ) ;
@@ -157,7 +157,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
157
157
{
158
158
let mut result = vec ! [ ] ;
159
159
let cdata = self . get_crate_data ( def_id. krate ) ;
160
- decoder:: each_inherent_implementation_for_type ( & * cdata, def_id. index ,
160
+ decoder:: each_inherent_implementation_for_type ( & cdata, def_id. index ,
161
161
|iid| result. push ( iid) ) ;
162
162
result
163
163
}
@@ -177,53 +177,53 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
177
177
-> Vec < Rc < ty:: Method < ' tcx > > >
178
178
{
179
179
let cdata = self . get_crate_data ( def. krate ) ;
180
- decoder:: get_provided_trait_methods ( self . intr . clone ( ) , & * cdata, def. index , tcx)
180
+ decoder:: get_provided_trait_methods ( self . intr . clone ( ) , & cdata, def. index , tcx)
181
181
}
182
182
183
183
fn trait_item_def_ids ( & self , def : DefId )
184
184
-> Vec < ty:: ImplOrTraitItemId >
185
185
{
186
186
let cdata = self . get_crate_data ( def. krate ) ;
187
- decoder:: get_trait_item_def_ids ( & * cdata, def. index )
187
+ decoder:: get_trait_item_def_ids ( & cdata, def. index )
188
188
}
189
189
190
190
fn impl_items ( & self , impl_def_id : DefId ) -> Vec < ty:: ImplOrTraitItemId >
191
191
{
192
192
let cdata = self . get_crate_data ( impl_def_id. krate ) ;
193
- decoder:: get_impl_items ( & * cdata, impl_def_id. index )
193
+ decoder:: get_impl_items ( & cdata, impl_def_id. index )
194
194
}
195
195
196
196
fn impl_polarity ( & self , def : DefId ) -> Option < hir:: ImplPolarity >
197
197
{
198
198
let cdata = self . get_crate_data ( def. krate ) ;
199
- decoder:: get_impl_polarity ( & * cdata, def. index )
199
+ decoder:: get_impl_polarity ( & cdata, def. index )
200
200
}
201
201
202
202
fn impl_trait_ref ( & self , tcx : & ty:: ctxt < ' tcx > , def : DefId )
203
203
-> Option < ty:: TraitRef < ' tcx > >
204
204
{
205
205
let cdata = self . get_crate_data ( def. krate ) ;
206
- decoder:: get_impl_trait ( & * cdata, def. index , tcx)
206
+ decoder:: get_impl_trait ( & cdata, def. index , tcx)
207
207
}
208
208
209
209
fn custom_coerce_unsized_kind ( & self , def : DefId )
210
210
-> Option < ty:: adjustment:: CustomCoerceUnsized >
211
211
{
212
212
let cdata = self . get_crate_data ( def. krate ) ;
213
- decoder:: get_custom_coerce_unsized_kind ( & * cdata, def. index )
213
+ decoder:: get_custom_coerce_unsized_kind ( & cdata, def. index )
214
214
}
215
215
216
216
// FIXME: killme
217
217
fn associated_consts ( & self , tcx : & ty:: ctxt < ' tcx > , def : DefId )
218
218
-> Vec < Rc < ty:: AssociatedConst < ' tcx > > > {
219
219
let cdata = self . get_crate_data ( def. krate ) ;
220
- decoder:: get_associated_consts ( self . intr . clone ( ) , & * cdata, def. index , tcx)
220
+ decoder:: get_associated_consts ( self . intr . clone ( ) , & cdata, def. index , tcx)
221
221
}
222
222
223
223
fn trait_of_item ( & self , tcx : & ty:: ctxt < ' tcx > , def_id : DefId ) -> Option < DefId >
224
224
{
225
225
let cdata = self . get_crate_data ( def_id. krate ) ;
226
- decoder:: get_trait_of_item ( & * cdata, def_id. index , tcx)
226
+ decoder:: get_trait_of_item ( & cdata, def_id. index , tcx)
227
227
}
228
228
229
229
fn impl_or_trait_item ( & self , tcx : & ty:: ctxt < ' tcx > , def : DefId )
@@ -232,7 +232,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
232
232
let cdata = self . get_crate_data ( def. krate ) ;
233
233
decoder:: get_impl_or_trait_item (
234
234
self . intr . clone ( ) ,
235
- & * cdata,
235
+ & cdata,
236
236
def. index ,
237
237
tcx)
238
238
}
@@ -246,29 +246,29 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
246
246
fn is_defaulted_trait ( & self , trait_def_id : DefId ) -> bool
247
247
{
248
248
let cdata = self . get_crate_data ( trait_def_id. krate ) ;
249
- decoder:: is_defaulted_trait ( & * cdata, trait_def_id. index )
249
+ decoder:: is_defaulted_trait ( & cdata, trait_def_id. index )
250
250
}
251
251
252
252
fn is_impl ( & self , did : DefId ) -> bool
253
253
{
254
254
let cdata = self . get_crate_data ( did. krate ) ;
255
- decoder:: is_impl ( & * cdata, did. index )
255
+ decoder:: is_impl ( & cdata, did. index )
256
256
}
257
257
258
258
fn is_default_impl ( & self , impl_did : DefId ) -> bool {
259
259
let cdata = self . get_crate_data ( impl_did. krate ) ;
260
- decoder:: is_default_impl ( & * cdata, impl_did. index )
260
+ decoder:: is_default_impl ( & cdata, impl_did. index )
261
261
}
262
262
263
263
fn is_extern_item ( & self , tcx : & ty:: ctxt < ' tcx > , did : DefId ) -> bool {
264
264
let cdata = self . get_crate_data ( did. krate ) ;
265
- decoder:: is_extern_item ( & * cdata, did. index , tcx)
265
+ decoder:: is_extern_item ( & cdata, did. index , tcx)
266
266
}
267
267
268
268
fn is_static_method ( & self , def : DefId ) -> bool
269
269
{
270
270
let cdata = self . get_crate_data ( def. krate ) ;
271
- decoder:: is_static_method ( & * cdata, def. index )
271
+ decoder:: is_static_method ( & cdata, def. index )
272
272
}
273
273
274
274
fn is_statically_included_foreign_item ( & self , id : ast:: NodeId ) -> bool
@@ -278,7 +278,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
278
278
279
279
fn is_typedef ( & self , did : DefId ) -> bool {
280
280
let cdata = self . get_crate_data ( did. krate ) ;
281
- decoder:: is_typedef ( & * cdata, did. index )
281
+ decoder:: is_typedef ( & cdata, did. index )
282
282
}
283
283
284
284
fn dylib_dependency_formats ( & self , cnum : ast:: CrateNum )
@@ -292,7 +292,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
292
292
{
293
293
let mut result = vec ! [ ] ;
294
294
let crate_data = self . get_crate_data ( cnum) ;
295
- decoder:: each_lang_item ( & * crate_data, |did, lid| {
295
+ decoder:: each_lang_item ( & crate_data, |did, lid| {
296
296
result. push ( ( did, lid) ) ; true
297
297
} ) ;
298
298
result
@@ -302,7 +302,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
302
302
-> Vec < lang_items:: LangItem >
303
303
{
304
304
let cdata = self . get_crate_data ( cnum) ;
305
- decoder:: get_missing_lang_items ( & * cdata)
305
+ decoder:: get_missing_lang_items ( & cdata)
306
306
}
307
307
308
308
fn is_staged_api ( & self , cnum : ast:: CrateNum ) -> bool
@@ -339,7 +339,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
339
339
fn crate_struct_field_attrs ( & self , cnum : ast:: CrateNum )
340
340
-> FnvHashMap < DefId , Vec < ast:: Attribute > >
341
341
{
342
- decoder:: get_struct_field_attrs ( & * self . get_crate_data ( cnum) )
342
+ decoder:: get_struct_field_attrs ( & self . get_crate_data ( cnum) )
343
343
}
344
344
345
345
fn plugin_registrar_fn ( & self , cnum : ast:: CrateNum ) -> Option < DefId >
@@ -354,19 +354,19 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
354
354
fn native_libraries ( & self , cnum : ast:: CrateNum ) -> Vec < ( NativeLibraryKind , String ) >
355
355
{
356
356
let cdata = self . get_crate_data ( cnum) ;
357
- decoder:: get_native_libraries ( & * cdata)
357
+ decoder:: get_native_libraries ( & cdata)
358
358
}
359
359
360
360
fn reachable_ids ( & self , cnum : ast:: CrateNum ) -> Vec < DefId >
361
361
{
362
362
let cdata = self . get_crate_data ( cnum) ;
363
- decoder:: get_reachable_ids ( & * cdata)
363
+ decoder:: get_reachable_ids ( & cdata)
364
364
}
365
365
366
366
fn def_path ( & self , def : DefId ) -> hir_map:: DefPath
367
367
{
368
368
let cdata = self . get_crate_data ( def. krate ) ;
369
- let path = decoder:: def_path ( & * cdata, def. index ) ;
369
+ let path = decoder:: def_path ( & cdata, def. index ) ;
370
370
let local_path = cdata. local_def_path ( ) ;
371
371
local_path. into_iter ( ) . chain ( path) . collect ( )
372
372
}
@@ -385,13 +385,13 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
385
385
fn tuple_struct_definition_if_ctor ( & self , did : DefId ) -> Option < DefId >
386
386
{
387
387
let cdata = self . get_crate_data ( did. krate ) ;
388
- decoder:: get_tuple_struct_definition_if_ctor ( & * cdata, did. index )
388
+ decoder:: get_tuple_struct_definition_if_ctor ( & cdata, did. index )
389
389
}
390
390
391
391
fn struct_field_names ( & self , def : DefId ) -> Vec < ast:: Name >
392
392
{
393
393
let cdata = self . get_crate_data ( def. krate ) ;
394
- decoder:: get_struct_field_names ( & self . intr , & * cdata, def. index )
394
+ decoder:: get_struct_field_names ( & self . intr , & cdata, def. index )
395
395
}
396
396
397
397
fn item_children ( & self , def_id : DefId ) -> Vec < ChildItem >
@@ -400,7 +400,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
400
400
let crate_data = self . get_crate_data ( def_id. krate ) ;
401
401
let get_crate_data = |cnum| self . get_crate_data ( cnum) ;
402
402
decoder:: each_child_of_item (
403
- self . intr . clone ( ) , & * crate_data,
403
+ self . intr . clone ( ) , & crate_data,
404
404
def_id. index , get_crate_data,
405
405
|def, name, vis| result. push ( ChildItem {
406
406
def : def,
@@ -416,7 +416,7 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
416
416
let crate_data = self . get_crate_data ( cnum) ;
417
417
let get_crate_data = |cnum| self . get_crate_data ( cnum) ;
418
418
decoder:: each_top_level_item_of_crate (
419
- self . intr . clone ( ) , & * crate_data, get_crate_data,
419
+ self . intr . clone ( ) , & crate_data, get_crate_data,
420
420
|def, name, vis| result. push ( ChildItem {
421
421
def : def,
422
422
name : name,
@@ -430,18 +430,18 @@ impl<'tcx> CrateStore<'tcx> for cstore::CStore {
430
430
{
431
431
let cdata = self . get_crate_data ( def. krate ) ;
432
432
let decode_inlined_item = Box :: new ( astencode:: decode_inlined_item) ;
433
- decoder:: maybe_get_item_ast ( & * cdata, tcx, def. index , decode_inlined_item)
433
+ decoder:: maybe_get_item_ast ( & cdata, tcx, def. index , decode_inlined_item)
434
434
}
435
435
436
436
fn maybe_get_item_mir ( & self , tcx : & ty:: ctxt < ' tcx > , def : DefId )
437
437
-> Option < Mir < ' tcx > > {
438
438
let cdata = self . get_crate_data ( def. krate ) ;
439
- decoder:: maybe_get_item_mir ( & * cdata, tcx, def. index )
439
+ decoder:: maybe_get_item_mir ( & cdata, tcx, def. index )
440
440
}
441
441
442
442
fn is_item_mir_available ( & self , def : DefId ) -> bool {
443
443
let cdata = self . get_crate_data ( def. krate ) ;
444
- decoder:: is_item_mir_available ( & * cdata, def. index )
444
+ decoder:: is_item_mir_available ( & cdata, def. index )
445
445
}
446
446
447
447
fn crates ( & self ) -> Vec < ast:: CrateNum >
0 commit comments