@@ -33,7 +33,7 @@ use crate::ty::subst::Subst;
33
33
use crate :: ty:: SubtypePredicate ;
34
34
use crate :: util:: nodemap:: { FxHashMap , FxHashSet } ;
35
35
36
- use errors:: { Applicability , DiagnosticBuilder , pluralise , Style } ;
36
+ use errors:: { Applicability , DiagnosticBuilder , pluralize , Style } ;
37
37
use std:: fmt;
38
38
use syntax:: ast;
39
39
use syntax:: symbol:: { sym, kw} ;
@@ -1341,7 +1341,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
1341
1341
param_env,
1342
1342
new_trait_ref. to_predicate ( ) ,
1343
1343
) ;
1344
- if self . predicate_may_hold ( & new_obligation) {
1344
+ if self . predicate_must_hold_modulo_regions ( & new_obligation) {
1345
1345
if let Ok ( snippet) = self . tcx . sess . source_map ( ) . span_to_snippet ( span) {
1346
1346
// We have a very specific type of error, where just borrowing this argument
1347
1347
// might solve the problem. In cases like this, the important part is the
@@ -1371,7 +1371,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
1371
1371
span,
1372
1372
"consider borrowing here" ,
1373
1373
format ! ( "&{}" , snippet) ,
1374
- Applicability :: MachineApplicable ,
1374
+ Applicability :: MaybeIncorrect ,
1375
1375
) ;
1376
1376
return true ;
1377
1377
}
0 commit comments