@@ -262,8 +262,8 @@ impl<'a> Resolver<'a> {
262
262
}
263
263
264
264
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 ) {
267
267
return Err ( ( Determined , Weak :: No ) ) ;
268
268
}
269
269
}
@@ -278,12 +278,12 @@ impl<'a> Resolver<'a> {
278
278
return resolution
279
279
. binding
280
280
. 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 ) {
287
287
return resolution. shadowed_glob ;
288
288
}
289
289
}
@@ -875,9 +875,9 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
875
875
/// consolidate multiple unresolved import errors into a single diagnostic.
876
876
fn finalize_import ( & mut self , import : & ' b Import < ' b > ) -> Option < UnresolvedImportError > {
877
877
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 {
879
879
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 ( ) ) )
881
881
}
882
882
_ => None ,
883
883
} ;
@@ -891,8 +891,8 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
891
891
import. crate_lint ( ) ,
892
892
) ;
893
893
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 ;
896
896
}
897
897
import. vis . set ( orig_vis) ;
898
898
if let PathResult :: Failed { .. } | PathResult :: NonModule ( ..) = path_res {
@@ -1013,8 +1013,8 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
1013
1013
self . r . per_ns ( |this, ns| {
1014
1014
if !type_ns_only || ns == TypeNS {
1015
1015
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 ( ) ) ;
1018
1018
let orig_last_import_segment = mem:: replace ( & mut this. last_import_segment , true ) ;
1019
1019
let binding = this. resolve_ident_in_module (
1020
1020
module,
@@ -1025,7 +1025,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
1025
1025
import. span ,
1026
1026
) ;
1027
1027
this. last_import_segment = orig_last_import_segment;
1028
- this. blacklisted_binding = orig_blacklisted_binding ;
1028
+ this. unusable_binding = orig_unusable_binding ;
1029
1029
import. vis . set ( orig_vis) ;
1030
1030
1031
1031
match binding {
@@ -1291,8 +1291,8 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
1291
1291
return ;
1292
1292
}
1293
1293
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 ( ) ) ;
1296
1296
1297
1297
match this. early_resolve_ident_in_lexical_scope (
1298
1298
target,
@@ -1311,7 +1311,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
1311
1311
Err ( _) => is_redundant[ ns] = Some ( false ) ,
1312
1312
}
1313
1313
1314
- this. blacklisted_binding = orig_blacklisted_binding ;
1314
+ this. unusable_binding = orig_unusable_binding ;
1315
1315
}
1316
1316
} ) ;
1317
1317
0 commit comments