File tree 1 file changed +3
-1
lines changed
src/librustc_mir/borrow_check/nll/region_infer/error_reporting
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ use std::collections::VecDeque;
22
22
use std:: fmt;
23
23
use syntax:: symbol:: keywords;
24
24
use syntax_pos:: Span ;
25
+ use syntax:: errors:: Applicability ;
25
26
26
27
mod region_name;
27
28
mod var_name;
@@ -540,14 +541,15 @@ impl<'tcx> RegionInferenceContext<'tcx> {
540
541
RegionName :: Named ( name) => format ! ( "{}" , name) ,
541
542
RegionName :: Synthesized ( _) => "'_" . to_string ( ) ,
542
543
} ;
543
- diag. span_suggestion (
544
+ diag. span_suggestion_with_applicability (
544
545
span,
545
546
& format ! (
546
547
"to allow this impl Trait to capture borrowed data with lifetime \
547
548
`{}`, add `{}` as a constraint",
548
549
fr_name, suggestable_fr_name,
549
550
) ,
550
551
format ! ( "{} + {}" , snippet, suggestable_fr_name) ,
552
+ Applicability :: MachineApplicable ,
551
553
) ;
552
554
}
553
555
}
You can’t perform that action at this time.
0 commit comments