@@ -297,6 +297,8 @@ impl Session {
297297 }
298298
299299 #[ rustc_lint_diagnostics]
300+ #[ allow( rustc:: untranslatable_diagnostic) ]
301+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
300302 pub fn struct_span_warn < S : Into < MultiSpan > > (
301303 & self ,
302304 sp : S ,
@@ -305,6 +307,8 @@ impl Session {
305307 self . diagnostic ( ) . struct_span_warn ( sp, msg)
306308 }
307309 #[ rustc_lint_diagnostics]
310+ #[ allow( rustc:: untranslatable_diagnostic) ]
311+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
308312 pub fn struct_span_warn_with_expectation < S : Into < MultiSpan > > (
309313 & self ,
310314 sp : S ,
@@ -314,6 +318,8 @@ impl Session {
314318 self . diagnostic ( ) . struct_span_warn_with_expectation ( sp, msg, id)
315319 }
316320 #[ rustc_lint_diagnostics]
321+ #[ allow( rustc:: untranslatable_diagnostic) ]
322+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
317323 pub fn struct_span_warn_with_code < S : Into < MultiSpan > > (
318324 & self ,
319325 sp : S ,
@@ -323,10 +329,14 @@ impl Session {
323329 self . diagnostic ( ) . struct_span_warn_with_code ( sp, msg, code)
324330 }
325331 #[ rustc_lint_diagnostics]
332+ #[ allow( rustc:: untranslatable_diagnostic) ]
333+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
326334 pub fn struct_warn ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
327335 self . diagnostic ( ) . struct_warn ( msg)
328336 }
329337 #[ rustc_lint_diagnostics]
338+ #[ allow( rustc:: untranslatable_diagnostic) ]
339+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
330340 pub fn struct_warn_with_expectation (
331341 & self ,
332342 msg : impl Into < DiagnosticMessage > ,
@@ -335,6 +345,8 @@ impl Session {
335345 self . diagnostic ( ) . struct_warn_with_expectation ( msg, id)
336346 }
337347 #[ rustc_lint_diagnostics]
348+ #[ allow( rustc:: untranslatable_diagnostic) ]
349+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
338350 pub fn struct_span_allow < S : Into < MultiSpan > > (
339351 & self ,
340352 sp : S ,
@@ -343,10 +355,14 @@ impl Session {
343355 self . diagnostic ( ) . struct_span_allow ( sp, msg)
344356 }
345357 #[ rustc_lint_diagnostics]
358+ #[ allow( rustc:: untranslatable_diagnostic) ]
359+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
346360 pub fn struct_allow ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
347361 self . diagnostic ( ) . struct_allow ( msg)
348362 }
349363 #[ rustc_lint_diagnostics]
364+ #[ allow( rustc:: untranslatable_diagnostic) ]
365+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
350366 pub fn struct_expect (
351367 & self ,
352368 msg : impl Into < DiagnosticMessage > ,
@@ -355,6 +371,8 @@ impl Session {
355371 self . diagnostic ( ) . struct_expect ( msg, id)
356372 }
357373 #[ rustc_lint_diagnostics]
374+ #[ allow( rustc:: untranslatable_diagnostic) ]
375+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
358376 pub fn struct_span_err < S : Into < MultiSpan > > (
359377 & self ,
360378 sp : S ,
@@ -363,6 +381,8 @@ impl Session {
363381 self . diagnostic ( ) . struct_span_err ( sp, msg)
364382 }
365383 #[ rustc_lint_diagnostics]
384+ #[ allow( rustc:: untranslatable_diagnostic) ]
385+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
366386 pub fn struct_span_err_with_code < S : Into < MultiSpan > > (
367387 & self ,
368388 sp : S ,
@@ -373,13 +393,17 @@ impl Session {
373393 }
374394 // FIXME: This method should be removed (every error should have an associated error code).
375395 #[ rustc_lint_diagnostics]
396+ #[ allow( rustc:: untranslatable_diagnostic) ]
397+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
376398 pub fn struct_err (
377399 & self ,
378400 msg : impl Into < DiagnosticMessage > ,
379401 ) -> DiagnosticBuilder < ' _ , ErrorGuaranteed > {
380402 self . parse_sess . struct_err ( msg)
381403 }
382404 #[ rustc_lint_diagnostics]
405+ #[ allow( rustc:: untranslatable_diagnostic) ]
406+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
383407 pub fn struct_err_with_code (
384408 & self ,
385409 msg : impl Into < DiagnosticMessage > ,
@@ -388,6 +412,8 @@ impl Session {
388412 self . diagnostic ( ) . struct_err_with_code ( msg, code)
389413 }
390414 #[ rustc_lint_diagnostics]
415+ #[ allow( rustc:: untranslatable_diagnostic) ]
416+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
391417 pub fn struct_warn_with_code (
392418 & self ,
393419 msg : impl Into < DiagnosticMessage > ,
@@ -396,6 +422,8 @@ impl Session {
396422 self . diagnostic ( ) . struct_warn_with_code ( msg, code)
397423 }
398424 #[ rustc_lint_diagnostics]
425+ #[ allow( rustc:: untranslatable_diagnostic) ]
426+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
399427 pub fn struct_span_fatal < S : Into < MultiSpan > > (
400428 & self ,
401429 sp : S ,
@@ -404,6 +432,8 @@ impl Session {
404432 self . diagnostic ( ) . struct_span_fatal ( sp, msg)
405433 }
406434 #[ rustc_lint_diagnostics]
435+ #[ allow( rustc:: untranslatable_diagnostic) ]
436+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
407437 pub fn struct_span_fatal_with_code < S : Into < MultiSpan > > (
408438 & self ,
409439 sp : S ,
@@ -413,15 +443,21 @@ impl Session {
413443 self . diagnostic ( ) . struct_span_fatal_with_code ( sp, msg, code)
414444 }
415445 #[ rustc_lint_diagnostics]
446+ #[ allow( rustc:: untranslatable_diagnostic) ]
447+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
416448 pub fn struct_fatal ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , !> {
417449 self . diagnostic ( ) . struct_fatal ( msg)
418450 }
419451
420452 #[ rustc_lint_diagnostics]
453+ #[ allow( rustc:: untranslatable_diagnostic) ]
454+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
421455 pub fn span_fatal < S : Into < MultiSpan > > ( & self , sp : S , msg : impl Into < DiagnosticMessage > ) -> ! {
422456 self . diagnostic ( ) . span_fatal ( sp, msg)
423457 }
424458 #[ rustc_lint_diagnostics]
459+ #[ allow( rustc:: untranslatable_diagnostic) ]
460+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
425461 pub fn span_fatal_with_code < S : Into < MultiSpan > > (
426462 & self ,
427463 sp : S ,
@@ -431,10 +467,14 @@ impl Session {
431467 self . diagnostic ( ) . span_fatal_with_code ( sp, msg, code)
432468 }
433469 #[ rustc_lint_diagnostics]
470+ #[ allow( rustc:: untranslatable_diagnostic) ]
471+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
434472 pub fn fatal ( & self , msg : impl Into < DiagnosticMessage > ) -> ! {
435473 self . diagnostic ( ) . fatal ( msg) . raise ( )
436474 }
437475 #[ rustc_lint_diagnostics]
476+ #[ allow( rustc:: untranslatable_diagnostic) ]
477+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
438478 pub fn span_err_or_warn < S : Into < MultiSpan > > (
439479 & self ,
440480 is_warning : bool ,
@@ -448,6 +488,8 @@ impl Session {
448488 }
449489 }
450490 #[ rustc_lint_diagnostics]
491+ #[ allow( rustc:: untranslatable_diagnostic) ]
492+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
451493 pub fn span_err < S : Into < MultiSpan > > (
452494 & self ,
453495 sp : S ,
@@ -456,6 +498,8 @@ impl Session {
456498 self . diagnostic ( ) . span_err ( sp, msg)
457499 }
458500 #[ rustc_lint_diagnostics]
501+ #[ allow( rustc:: untranslatable_diagnostic) ]
502+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
459503 pub fn span_err_with_code < S : Into < MultiSpan > > (
460504 & self ,
461505 sp : S ,
0 commit comments