@@ -33,7 +33,7 @@ use crate::ty::subst::Subst;
3333use crate :: ty:: SubtypePredicate ;
3434use crate :: util:: nodemap:: { FxHashMap , FxHashSet } ;
3535
36- use errors:: { Applicability , DiagnosticBuilder , pluralise , Style } ;
36+ use errors:: { Applicability , DiagnosticBuilder , pluralize , Style } ;
3737use std:: fmt;
3838use syntax:: ast;
3939use syntax:: symbol:: { sym, kw} ;
@@ -1339,7 +1339,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
13391339 param_env,
13401340 new_trait_ref. to_predicate ( ) ,
13411341 ) ;
1342- if self . predicate_may_hold ( & new_obligation) {
1342+ if self . predicate_must_hold_modulo_regions ( & new_obligation) {
13431343 if let Ok ( snippet) = self . tcx . sess . source_map ( ) . span_to_snippet ( span) {
13441344 // We have a very specific type of error, where just borrowing this argument
13451345 // might solve the problem. In cases like this, the important part is the
@@ -1369,7 +1369,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
13691369 span,
13701370 "consider borrowing here" ,
13711371 format ! ( "&{}" , snippet) ,
1372- Applicability :: MachineApplicable ,
1372+ Applicability :: MaybeIncorrect ,
13731373 ) ;
13741374 return true ;
13751375 }
0 commit comments