@@ -201,6 +201,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
201201 // For generic associated types (GATs) which implied 'static requirement
202202 // from higher-ranked trait bounds (HRTB). Try to locate span of the trait
203203 // and the span which bounded to the trait for adding 'static lifetime suggestion
204+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
205+ #[ allow( rustc:: untranslatable_diagnostic) ] // FIXME: make this translatable
204206 fn suggest_static_lifetime_for_gat_from_hrtb (
205207 & self ,
206208 diag : & mut Diag < ' _ > ,
@@ -254,9 +256,6 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
254256
255257 hrtb_bounds. iter ( ) . for_each ( |bound| {
256258 let Trait ( PolyTraitRef { trait_ref, span : trait_span, .. } , _) = bound else { return ; } ;
257- // FIXME: make this translatable
258- #[ allow( rustc:: diagnostic_outside_of_impl) ]
259- #[ allow( rustc:: untranslatable_diagnostic) ]
260259 diag. span_note (
261260 * trait_span,
262261 "due to current limitations in the borrow checker, this implies a `'static` lifetime"
@@ -580,6 +579,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
580579 /// executing...
581580 /// = note: ...therefore, returned references to captured variables will escape the closure
582581 /// ```
582+ #[ allow( rustc:: diagnostic_outside_of_impl) ] // FIXME
583583 fn report_fnmut_error (
584584 & self ,
585585 errci : & ErrorConstraintInfo < ' tcx > ,
@@ -761,6 +761,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
761761 /// | ^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'a` but it
762762 /// | is returning data with lifetime `'b`
763763 /// ```
764+ #[ allow( rustc:: diagnostic_outside_of_impl) ] // FIXME
764765 fn report_general_error ( & self , errci : & ErrorConstraintInfo < ' tcx > ) -> Diag < ' tcx > {
765766 let ErrorConstraintInfo {
766767 fr,
@@ -822,6 +823,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
822823 /// LL | fn iter_values_anon(&self) -> impl Iterator<Item=u32> + 'a {
823824 /// | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
824825 /// ```
826+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
827+ #[ allow( rustc:: untranslatable_diagnostic) ] // FIXME: make this translatable
825828 fn add_static_impl_trait_suggestion (
826829 & self ,
827830 diag : & mut Diag < ' _ > ,
@@ -972,6 +975,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
972975 self . suggest_constrain_dyn_trait_in_impl ( diag, & visitor. 0 , ident, self_ty) ;
973976 }
974977
978+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
979+ #[ allow( rustc:: untranslatable_diagnostic) ] // FIXME: make this translatable
975980 #[ instrument( skip( self , err) , level = "debug" ) ]
976981 fn suggest_constrain_dyn_trait_in_impl (
977982 & self ,
@@ -1034,6 +1039,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
10341039 suggest_adding_lifetime_params ( self . infcx . tcx , sub, ty_sup, ty_sub, diag) ;
10351040 }
10361041
1042+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
1043+ #[ allow( rustc:: untranslatable_diagnostic) ] // FIXME: make this translatable
10371044 fn suggest_move_on_borrowing_closure ( & self , diag : & mut Diag < ' _ > ) {
10381045 let map = self . infcx . tcx . hir ( ) ;
10391046 let body_id = map. body_owned_by ( self . mir_def_id ( ) ) ;
0 commit comments