@@ -262,8 +262,8 @@ impl<'a> Resolver<'a> {
262262 }
263263
264264 let check_usable = |this : & mut Self , binding : & ' a NameBinding < ' a > | {
265- if let Some ( blacklisted_binding ) = this. blacklisted_binding {
266- if ptr:: eq ( binding, blacklisted_binding ) {
265+ if let Some ( unusable_binding ) = this. unusable_binding {
266+ if ptr:: eq ( binding, unusable_binding ) {
267267 return Err ( ( Determined , Weak :: No ) ) ;
268268 }
269269 }
@@ -278,12 +278,12 @@ impl<'a> Resolver<'a> {
278278 return resolution
279279 . binding
280280 . and_then ( |binding| {
281- // If the primary binding is blacklisted , search further and return the shadowed
282- // glob binding if it exists. What we really want here is having two separate
283- // scopes in a module - one for non-globs and one for globs, but until that's done
284- // use this hack to avoid inconsistent resolution ICEs during import validation.
285- if let Some ( blacklisted_binding ) = self . blacklisted_binding {
286- if ptr:: eq ( binding, blacklisted_binding ) {
281+ // If the primary binding is unusable , search further and return the shadowed glob
282+ // binding if it exists. What we really want here is having two separate scopes in
283+ // a module - one for non-globs and one for globs, but until that's done use this
284+ // hack to avoid inconsistent resolution ICEs during import validation.
285+ if let Some ( unusable_binding ) = self . unusable_binding {
286+ if ptr:: eq ( binding, unusable_binding ) {
287287 return resolution. shadowed_glob ;
288288 }
289289 }
@@ -875,9 +875,9 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
875875 /// consolidate multiple unresolved import errors into a single diagnostic.
876876 fn finalize_import ( & mut self , import : & ' b Import < ' b > ) -> Option < UnresolvedImportError > {
877877 let orig_vis = import. vis . replace ( ty:: Visibility :: Invisible ) ;
878- let orig_blacklisted_binding = match & import. kind {
878+ let orig_unusable_binding = match & import. kind {
879879 ImportKind :: Single { target_bindings, .. } => {
880- Some ( mem:: replace ( & mut self . r . blacklisted_binding , target_bindings[ TypeNS ] . get ( ) ) )
880+ Some ( mem:: replace ( & mut self . r . unusable_binding , target_bindings[ TypeNS ] . get ( ) ) )
881881 }
882882 _ => None ,
883883 } ;
@@ -891,8 +891,8 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
891891 import. crate_lint ( ) ,
892892 ) ;
893893 let no_ambiguity = self . r . ambiguity_errors . len ( ) == prev_ambiguity_errors_len;
894- if let Some ( orig_blacklisted_binding ) = orig_blacklisted_binding {
895- self . r . blacklisted_binding = orig_blacklisted_binding ;
894+ if let Some ( orig_unusable_binding ) = orig_unusable_binding {
895+ self . r . unusable_binding = orig_unusable_binding ;
896896 }
897897 import. vis . set ( orig_vis) ;
898898 if let PathResult :: Failed { .. } | PathResult :: NonModule ( ..) = path_res {
@@ -1013,8 +1013,8 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
10131013 self . r . per_ns ( |this, ns| {
10141014 if !type_ns_only || ns == TypeNS {
10151015 let orig_vis = import. vis . replace ( ty:: Visibility :: Invisible ) ;
1016- let orig_blacklisted_binding =
1017- mem:: replace ( & mut this. blacklisted_binding , target_bindings[ ns] . get ( ) ) ;
1016+ let orig_unusable_binding =
1017+ mem:: replace ( & mut this. unusable_binding , target_bindings[ ns] . get ( ) ) ;
10181018 let orig_last_import_segment = mem:: replace ( & mut this. last_import_segment , true ) ;
10191019 let binding = this. resolve_ident_in_module (
10201020 module,
@@ -1025,7 +1025,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
10251025 import. span ,
10261026 ) ;
10271027 this. last_import_segment = orig_last_import_segment;
1028- this. blacklisted_binding = orig_blacklisted_binding ;
1028+ this. unusable_binding = orig_unusable_binding ;
10291029 import. vis . set ( orig_vis) ;
10301030
10311031 match binding {
@@ -1291,8 +1291,8 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
12911291 return ;
12921292 }
12931293
1294- let orig_blacklisted_binding =
1295- mem:: replace ( & mut this. blacklisted_binding , target_bindings[ ns] . get ( ) ) ;
1294+ let orig_unusable_binding =
1295+ mem:: replace ( & mut this. unusable_binding , target_bindings[ ns] . get ( ) ) ;
12961296
12971297 match this. early_resolve_ident_in_lexical_scope (
12981298 target,
@@ -1311,7 +1311,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
13111311 Err ( _) => is_redundant[ ns] = Some ( false ) ,
13121312 }
13131313
1314- this. blacklisted_binding = orig_blacklisted_binding ;
1314+ this. unusable_binding = orig_unusable_binding ;
13151315 }
13161316 } ) ;
13171317
0 commit comments