@@ -687,16 +687,16 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
687687 return false ;
688688 }
689689
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.
691691 // For instance, immutable references are always Copy, so suggesting to
692692 // 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 < _ > =
694694 [ LangItem :: Copy , LangItem :: Clone , LangItem :: Unpin , LangItem :: Sized ]
695695 . iter ( )
696696 . filter_map ( |lang_item| self . tcx . lang_items ( ) . require ( * lang_item) . ok ( ) )
697697 . collect ( ) ;
698698
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 ( ) ) ;
700700
701701 let span = obligation. cause . span ;
702702 let param_env = obligation. param_env ;
@@ -799,15 +799,15 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
799799 ty:: TraitRef :: new ( trait_ref. def_id , imm_substs) ,
800800 trait_ref,
801801 false ,
802- & blacklist [ ..] ,
802+ & never_suggest_borrow [ ..] ,
803803 ) {
804804 return true ;
805805 } else {
806806 return try_borrowing (
807807 ty:: TraitRef :: new ( trait_ref. def_id , mut_substs) ,
808808 trait_ref,
809809 true ,
810- & blacklist [ ..] ,
810+ & never_suggest_borrow [ ..] ,
811811 ) ;
812812 }
813813 } else {
0 commit comments