@@ -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} ;
@@ -1341,7 +1341,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
13411341 param_env,
13421342 new_trait_ref. to_predicate ( ) ,
13431343 ) ;
1344- if self . predicate_may_hold ( & new_obligation) {
1344+ if self . predicate_must_hold_modulo_regions ( & new_obligation) {
13451345 if let Ok ( snippet) = self . tcx . sess . source_map ( ) . span_to_snippet ( span) {
13461346 // We have a very specific type of error, where just borrowing this argument
13471347 // might solve the problem. In cases like this, the important part is the
@@ -1371,7 +1371,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
13711371 span,
13721372 "consider borrowing here" ,
13731373 format ! ( "&{}" , snippet) ,
1374- Applicability :: MachineApplicable ,
1374+ Applicability :: MaybeIncorrect ,
13751375 ) ;
13761376 return true ;
13771377 }
0 commit comments