@@ -198,7 +198,6 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
198198 // from higher-ranked trait bounds (HRTB). Try to locate span of the trait
199199 // and the span which bounded to the trait for adding 'static lifetime suggestion
200200 #[ allow( rustc:: diagnostic_outside_of_impl) ]
201- #[ allow( rustc:: untranslatable_diagnostic) ] // FIXME: make this translatable
202201 fn suggest_static_lifetime_for_gat_from_hrtb (
203202 & self ,
204203 diag : & mut Diag < ' _ > ,
@@ -254,7 +253,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
254253 let Trait ( PolyTraitRef { trait_ref, span : trait_span, .. } , _) = bound else { return ; } ;
255254 diag. span_note (
256255 * trait_span,
257- "due to current limitations in the borrow checker, this implies a `'static` lifetime"
256+ fluent_generated :: borrowck_limitations_implies_static ,
258257 ) ;
259258 let Some ( generics_fn) = hir. get_generics ( self . body . source . def_id ( ) . expect_local ( ) ) else { return ; } ;
260259 let Def ( _, trait_res_defid) = trait_ref. path . res else { return ; } ;
@@ -286,7 +285,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, '_, 'infcx, 'tcx> {
286285 if suggestions. len ( ) > 0 {
287286 suggestions. dedup ( ) ;
288287 diag. multipart_suggestion_verbose (
289- "consider restricting the type parameter to the `'static` lifetime" ,
288+ fluent_generated :: borrowck_restrict_to_static ,
290289 suggestions,
291290 Applicability :: MaybeIncorrect ,
292291 ) ;
0 commit comments