@@ -687,16 +687,16 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
687
687
return false ;
688
688
}
689
689
690
- // Blacklist traits for which it would be nonsensical to suggest borrowing.
690
+ // List of traits for which it would be nonsensical to suggest borrowing.
691
691
// For instance, immutable references are always Copy, so suggesting to
692
692
// borrow would always succeed, but it's probably not what the user wanted.
693
- let mut blacklist : Vec < _ > =
693
+ let mut never_suggest_borrow : Vec < _ > =
694
694
[ LangItem :: Copy , LangItem :: Clone , LangItem :: Unpin , LangItem :: Sized ]
695
695
. iter ( )
696
696
. filter_map ( |lang_item| self . tcx . lang_items ( ) . require ( * lang_item) . ok ( ) )
697
697
. collect ( ) ;
698
698
699
- blacklist . push ( self . tcx . get_diagnostic_item ( sym:: send_trait) . unwrap ( ) ) ;
699
+ never_suggest_borrow . push ( self . tcx . get_diagnostic_item ( sym:: send_trait) . unwrap ( ) ) ;
700
700
701
701
let span = obligation. cause . span ;
702
702
let param_env = obligation. param_env ;
@@ -799,15 +799,15 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
799
799
ty:: TraitRef :: new ( trait_ref. def_id , imm_substs) ,
800
800
trait_ref,
801
801
false ,
802
- & blacklist [ ..] ,
802
+ & never_suggest_borrow [ ..] ,
803
803
) {
804
804
return true ;
805
805
} else {
806
806
return try_borrowing (
807
807
ty:: TraitRef :: new ( trait_ref. def_id , mut_substs) ,
808
808
trait_ref,
809
809
true ,
810
- & blacklist [ ..] ,
810
+ & never_suggest_borrow [ ..] ,
811
811
) ;
812
812
}
813
813
} else {
0 commit comments