@@ -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 } ;
@@ -161,14 +160,9 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
161
160
} ;
162
161
163
162
// Build up the import directives.
164
- let shadowable = item. attrs . iter ( ) . any ( |attr| {
163
+ let is_prelude = item. attrs . iter ( ) . any ( |attr| {
165
164
attr. name ( ) == special_idents:: prelude_import. name . as_str ( )
166
165
} ) ;
167
- let shadowable = if shadowable {
168
- Shadowable :: Always
169
- } else {
170
- Shadowable :: Never
171
- } ;
172
166
173
167
match view_path. node {
174
168
ViewPathSimple ( binding, ref full_path) => {
@@ -186,7 +180,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
186
180
view_path. span ,
187
181
item. id ,
188
182
is_public,
189
- shadowable ) ;
183
+ is_prelude ) ;
190
184
}
191
185
ViewPathList ( _, ref source_items) => {
192
186
// 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> {
237
231
source_item. span ,
238
232
source_item. node . id ( ) ,
239
233
is_public,
240
- shadowable ) ;
234
+ is_prelude ) ;
241
235
}
242
236
}
243
237
ViewPathGlob ( _) => {
@@ -247,7 +241,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
247
241
view_path. span ,
248
242
item. id ,
249
243
is_public,
250
- shadowable ) ;
244
+ is_prelude ) ;
251
245
}
252
246
}
253
247
parent
@@ -631,7 +625,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
631
625
span : Span ,
632
626
id : NodeId ,
633
627
is_public : bool ,
634
- shadowable : Shadowable ) {
628
+ is_prelude : bool ) {
635
629
// Bump the reference count on the name. Or, if this is a glob, set
636
630
// the appropriate flag.
637
631
@@ -648,7 +642,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
648
642
}
649
643
650
644
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 ) ;
652
646
module_. add_import_directive ( directive) ;
653
647
self . unresolved_imports += 1 ;
654
648
}
0 commit comments