@@ -22,7 +22,6 @@ use {NameBinding, NameBindingKind};
2222use module_to_string;
2323use ParentLink :: { ModuleParentLink , BlockParentLink } ;
2424use Resolver ;
25- use resolve_imports:: Shadowable ;
2625use { resolve_error, resolve_struct_error, ResolutionError } ;
2726
2827use rustc:: middle:: cstore:: { CrateStore , ChildItem , DlDef , DlField , DlImpl } ;
@@ -161,14 +160,9 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
161160 } ;
162161
163162 // Build up the import directives.
164- let shadowable = item. attrs . iter ( ) . any ( |attr| {
163+ let is_prelude = item. attrs . iter ( ) . any ( |attr| {
165164 attr. name ( ) == special_idents:: prelude_import. name . as_str ( )
166165 } ) ;
167- let shadowable = if shadowable {
168- Shadowable :: Always
169- } else {
170- Shadowable :: Never
171- } ;
172166
173167 match view_path. node {
174168 ViewPathSimple ( binding, ref full_path) => {
@@ -186,7 +180,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
186180 view_path. span ,
187181 item. id ,
188182 is_public,
189- shadowable ) ;
183+ is_prelude ) ;
190184 }
191185 ViewPathList ( _, ref source_items) => {
192186 // Make sure there's at most one `mod` import in the list.
@@ -237,7 +231,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
237231 source_item. span ,
238232 source_item. node . id ( ) ,
239233 is_public,
240- shadowable ) ;
234+ is_prelude ) ;
241235 }
242236 }
243237 ViewPathGlob ( _) => {
@@ -247,7 +241,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
247241 view_path. span ,
248242 item. id ,
249243 is_public,
250- shadowable ) ;
244+ is_prelude ) ;
251245 }
252246 }
253247 parent
@@ -631,7 +625,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
631625 span : Span ,
632626 id : NodeId ,
633627 is_public : bool ,
634- shadowable : Shadowable ) {
628+ is_prelude : bool ) {
635629 // Bump the reference count on the name. Or, if this is a glob, set
636630 // the appropriate flag.
637631
@@ -648,7 +642,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
648642 }
649643
650644 let directive =
651- ImportDirective :: new ( module_path, subclass, span, id, is_public, shadowable ) ;
645+ ImportDirective :: new ( module_path, subclass, span, id, is_public, is_prelude ) ;
652646 module_. add_import_directive ( directive) ;
653647 self . unresolved_imports += 1 ;
654648 }
0 commit comments