File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/librustc_mir/borrow_check/nll/region_infer/error_reporting Expand file tree Collapse file tree 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;
2222use std:: fmt;
2323use syntax:: symbol:: keywords;
2424use syntax_pos:: Span ;
25+ use syntax:: errors:: Applicability ;
2526
2627mod region_name;
2728mod var_name;
@@ -540,14 +541,15 @@ impl<'tcx> RegionInferenceContext<'tcx> {
540541 RegionName :: Named ( name) => format ! ( "{}" , name) ,
541542 RegionName :: Synthesized ( _) => "'_" . to_string ( ) ,
542543 } ;
543- diag. span_suggestion (
544+ diag. span_suggestion_with_applicability (
544545 span,
545546 & format ! (
546547 "to allow this impl Trait to capture borrowed data with lifetime \
547548 `{}`, add `{}` as a constraint",
548549 fr_name, suggestable_fr_name,
549550 ) ,
550551 format ! ( "{} + {}" , snippet, suggestable_fr_name) ,
552+ Applicability :: MachineApplicable ,
551553 ) ;
552554 }
553555 }
You can’t perform that action at this time.
0 commit comments