@@ -35,7 +35,7 @@ use crate::session_diagnostics::{
35
35
LifetimeReturnCategoryErr , RequireStaticErr , VarHereDenote ,
36
36
} ;
37
37
use crate :: universal_regions:: DefiningTy ;
38
- use crate :: { borrowck_errors, MirBorrowckCtxt } ;
38
+ use crate :: { borrowck_errors, fluent_generated , MirBorrowckCtxt } ;
39
39
40
40
impl < ' tcx > ConstraintDescription for ConstraintCategory < ' tcx > {
41
41
fn description ( & self ) -> & ' static str {
@@ -1045,7 +1045,6 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
1045
1045
}
1046
1046
1047
1047
#[ allow( rustc:: diagnostic_outside_of_impl) ]
1048
- #[ allow( rustc:: untranslatable_diagnostic) ] // FIXME: make this translatable
1049
1048
/// When encountering a lifetime error caused by the return type of a closure, check the
1050
1049
/// corresponding trait bound and see if dereferencing the closure return value would satisfy
1051
1050
/// them. If so, we produce a structured suggestion.
@@ -1166,7 +1165,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
1166
1165
if ocx. select_all_or_error ( ) . is_empty ( ) && count > 0 {
1167
1166
diag. span_suggestion_verbose (
1168
1167
tcx. hir ( ) . body ( * body) . value . peel_blocks ( ) . span . shrink_to_lo ( ) ,
1169
- "dereference the return value" ,
1168
+ fluent_generated :: borrowck_dereference_suggestion ,
1170
1169
"*" . repeat ( count) ,
1171
1170
Applicability :: MachineApplicable ,
1172
1171
) ;
0 commit comments