@@ -22,7 +22,6 @@ use {NameBinding, NameBindingKind};
22
22
use module_to_string;
23
23
use ParentLink :: { ModuleParentLink , BlockParentLink } ;
24
24
use Resolver ;
25
- use resolve_imports:: Shadowable ;
26
25
use { resolve_error, resolve_struct_error, ResolutionError } ;
27
26
28
27
use rustc:: middle:: cstore:: { CrateStore , ChildItem , DlDef , DlField , DlImpl } ;
@@ -189,14 +188,9 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
189
188
} ;
190
189
191
190
// Build up the import directives.
192
- let shadowable = item. attrs . iter ( ) . any ( |attr| {
191
+ let is_prelude = item. attrs . iter ( ) . any ( |attr| {
193
192
attr. name ( ) == special_idents:: prelude_import. name . as_str ( )
194
193
} ) ;
195
- let shadowable = if shadowable {
196
- Shadowable :: Always
197
- } else {
198
- Shadowable :: Never
199
- } ;
200
194
201
195
match view_path. node {
202
196
ViewPathSimple ( binding, ref full_path) => {
@@ -214,7 +208,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
214
208
view_path. span ,
215
209
item. id ,
216
210
is_public,
217
- shadowable ) ;
211
+ is_prelude ) ;
218
212
}
219
213
ViewPathList ( _, ref source_items) => {
220
214
// Make sure there's at most one `mod` import in the list.
@@ -265,7 +259,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
265
259
source_item. span ,
266
260
source_item. node . id ( ) ,
267
261
is_public,
268
- shadowable ) ;
262
+ is_prelude ) ;
269
263
}
270
264
}
271
265
ViewPathGlob ( _) => {
@@ -275,7 +269,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
275
269
view_path. span ,
276
270
item. id ,
277
271
is_public,
278
- shadowable ) ;
272
+ is_prelude ) ;
279
273
}
280
274
}
281
275
parent
@@ -661,7 +655,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
661
655
span : Span ,
662
656
id : NodeId ,
663
657
is_public : bool ,
664
- shadowable : Shadowable ) {
658
+ is_prelude : bool ) {
665
659
// Bump the reference count on the name. Or, if this is a glob, set
666
660
// the appropriate flag.
667
661
@@ -678,7 +672,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
678
672
}
679
673
680
674
let directive =
681
- ImportDirective :: new ( module_path, subclass, span, id, is_public, shadowable ) ;
675
+ ImportDirective :: new ( module_path, subclass, span, id, is_public, is_prelude ) ;
682
676
module_. add_import_directive ( directive) ;
683
677
self . unresolved_imports += 1 ;
684
678
}
0 commit comments