@@ -198,7 +198,6 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
198
198
// from higher-ranked trait bounds (HRTB). Try to locate span of the trait
199
199
// and the span which bounded to the trait for adding 'static lifetime suggestion
200
200
#[ allow( rustc:: diagnostic_outside_of_impl) ]
201
- #[ allow( rustc:: untranslatable_diagnostic) ] // FIXME: make this translatable
202
201
fn suggest_static_lifetime_for_gat_from_hrtb (
203
202
& self ,
204
203
diag : & mut Diag < ' _ > ,
@@ -254,7 +253,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
254
253
let Trait ( PolyTraitRef { trait_ref, span : trait_span, .. } , _) = bound else { return ; } ;
255
254
diag. span_note (
256
255
* trait_span,
257
- "due to current limitations in the borrow checker, this implies a `'static` lifetime"
256
+ fluent_generated :: borrowck_limitations_implies_static ,
258
257
) ;
259
258
let Some ( generics_fn) = hir. get_generics ( self . body . source . def_id ( ) . expect_local ( ) ) else { return ; } ;
260
259
let Def ( _, trait_res_defid) = trait_ref. path . res else { return ; } ;
@@ -286,7 +285,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
286
285
if suggestions. len ( ) > 0 {
287
286
suggestions. dedup ( ) ;
288
287
diag. multipart_suggestion_verbose (
289
- "consider restricting the type parameter to the `'static` lifetime" ,
288
+ fluent_generated :: borrowck_restrict_to_static ,
290
289
suggestions,
291
290
Applicability :: MaybeIncorrect ,
292
291
) ;
0 commit comments