@@ -35,7 +35,7 @@ use crate::session_diagnostics::{
3535 LifetimeReturnCategoryErr , RequireStaticErr , VarHereDenote ,
3636} ;
3737use crate :: universal_regions:: DefiningTy ;
38- use crate :: { borrowck_errors, MirBorrowckCtxt } ;
38+ use crate :: { borrowck_errors, fluent_generated , MirBorrowckCtxt } ;
3939
4040impl < ' tcx > ConstraintDescription for ConstraintCategory < ' tcx > {
4141 fn description ( & self ) -> & ' static str {
@@ -1045,7 +1045,6 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
10451045 }
10461046
10471047 #[ allow( rustc:: diagnostic_outside_of_impl) ]
1048- #[ allow( rustc:: untranslatable_diagnostic) ] // FIXME: make this translatable
10491048 /// When encountering a lifetime error caused by the return type of a closure, check the
10501049 /// corresponding trait bound and see if dereferencing the closure return value would satisfy
10511050 /// them. If so, we produce a structured suggestion.
@@ -1166,7 +1165,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
11661165 if ocx. select_all_or_error ( ) . is_empty ( ) && count > 0 {
11671166 diag. span_suggestion_verbose (
11681167 tcx. hir ( ) . body ( * body) . value . peel_blocks ( ) . span . shrink_to_lo ( ) ,
1169- "dereference the return value" ,
1168+ fluent_generated :: borrowck_dereference_suggestion ,
11701169 "*" . repeat ( count) ,
11711170 Applicability :: MachineApplicable ,
11721171 ) ;
0 commit comments