@@ -297,6 +297,8 @@ impl Session {
297
297
}
298
298
299
299
#[ rustc_lint_diagnostics]
300
+ #[ allow( rustc:: untranslatable_diagnostic) ]
301
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
300
302
pub fn struct_span_warn < S : Into < MultiSpan > > (
301
303
& self ,
302
304
sp : S ,
@@ -305,6 +307,8 @@ impl Session {
305
307
self . diagnostic ( ) . struct_span_warn ( sp, msg)
306
308
}
307
309
#[ rustc_lint_diagnostics]
310
+ #[ allow( rustc:: untranslatable_diagnostic) ]
311
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
308
312
pub fn struct_span_warn_with_expectation < S : Into < MultiSpan > > (
309
313
& self ,
310
314
sp : S ,
@@ -314,6 +318,8 @@ impl Session {
314
318
self . diagnostic ( ) . struct_span_warn_with_expectation ( sp, msg, id)
315
319
}
316
320
#[ rustc_lint_diagnostics]
321
+ #[ allow( rustc:: untranslatable_diagnostic) ]
322
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
317
323
pub fn struct_span_warn_with_code < S : Into < MultiSpan > > (
318
324
& self ,
319
325
sp : S ,
@@ -323,10 +329,14 @@ impl Session {
323
329
self . diagnostic ( ) . struct_span_warn_with_code ( sp, msg, code)
324
330
}
325
331
#[ rustc_lint_diagnostics]
332
+ #[ allow( rustc:: untranslatable_diagnostic) ]
333
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
326
334
pub fn struct_warn ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
327
335
self . diagnostic ( ) . struct_warn ( msg)
328
336
}
329
337
#[ rustc_lint_diagnostics]
338
+ #[ allow( rustc:: untranslatable_diagnostic) ]
339
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
330
340
pub fn struct_warn_with_expectation (
331
341
& self ,
332
342
msg : impl Into < DiagnosticMessage > ,
@@ -335,6 +345,8 @@ impl Session {
335
345
self . diagnostic ( ) . struct_warn_with_expectation ( msg, id)
336
346
}
337
347
#[ rustc_lint_diagnostics]
348
+ #[ allow( rustc:: untranslatable_diagnostic) ]
349
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
338
350
pub fn struct_span_allow < S : Into < MultiSpan > > (
339
351
& self ,
340
352
sp : S ,
@@ -343,10 +355,14 @@ impl Session {
343
355
self . diagnostic ( ) . struct_span_allow ( sp, msg)
344
356
}
345
357
#[ rustc_lint_diagnostics]
358
+ #[ allow( rustc:: untranslatable_diagnostic) ]
359
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
346
360
pub fn struct_allow ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , ( ) > {
347
361
self . diagnostic ( ) . struct_allow ( msg)
348
362
}
349
363
#[ rustc_lint_diagnostics]
364
+ #[ allow( rustc:: untranslatable_diagnostic) ]
365
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
350
366
pub fn struct_expect (
351
367
& self ,
352
368
msg : impl Into < DiagnosticMessage > ,
@@ -355,6 +371,8 @@ impl Session {
355
371
self . diagnostic ( ) . struct_expect ( msg, id)
356
372
}
357
373
#[ rustc_lint_diagnostics]
374
+ #[ allow( rustc:: untranslatable_diagnostic) ]
375
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
358
376
pub fn struct_span_err < S : Into < MultiSpan > > (
359
377
& self ,
360
378
sp : S ,
@@ -363,6 +381,8 @@ impl Session {
363
381
self . diagnostic ( ) . struct_span_err ( sp, msg)
364
382
}
365
383
#[ rustc_lint_diagnostics]
384
+ #[ allow( rustc:: untranslatable_diagnostic) ]
385
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
366
386
pub fn struct_span_err_with_code < S : Into < MultiSpan > > (
367
387
& self ,
368
388
sp : S ,
@@ -373,13 +393,17 @@ impl Session {
373
393
}
374
394
// FIXME: This method should be removed (every error should have an associated error code).
375
395
#[ rustc_lint_diagnostics]
396
+ #[ allow( rustc:: untranslatable_diagnostic) ]
397
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
376
398
pub fn struct_err (
377
399
& self ,
378
400
msg : impl Into < DiagnosticMessage > ,
379
401
) -> DiagnosticBuilder < ' _ , ErrorGuaranteed > {
380
402
self . parse_sess . struct_err ( msg)
381
403
}
382
404
#[ rustc_lint_diagnostics]
405
+ #[ allow( rustc:: untranslatable_diagnostic) ]
406
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
383
407
pub fn struct_err_with_code (
384
408
& self ,
385
409
msg : impl Into < DiagnosticMessage > ,
@@ -388,6 +412,8 @@ impl Session {
388
412
self . diagnostic ( ) . struct_err_with_code ( msg, code)
389
413
}
390
414
#[ rustc_lint_diagnostics]
415
+ #[ allow( rustc:: untranslatable_diagnostic) ]
416
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
391
417
pub fn struct_warn_with_code (
392
418
& self ,
393
419
msg : impl Into < DiagnosticMessage > ,
@@ -396,6 +422,8 @@ impl Session {
396
422
self . diagnostic ( ) . struct_warn_with_code ( msg, code)
397
423
}
398
424
#[ rustc_lint_diagnostics]
425
+ #[ allow( rustc:: untranslatable_diagnostic) ]
426
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
399
427
pub fn struct_span_fatal < S : Into < MultiSpan > > (
400
428
& self ,
401
429
sp : S ,
@@ -404,6 +432,8 @@ impl Session {
404
432
self . diagnostic ( ) . struct_span_fatal ( sp, msg)
405
433
}
406
434
#[ rustc_lint_diagnostics]
435
+ #[ allow( rustc:: untranslatable_diagnostic) ]
436
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
407
437
pub fn struct_span_fatal_with_code < S : Into < MultiSpan > > (
408
438
& self ,
409
439
sp : S ,
@@ -413,15 +443,21 @@ impl Session {
413
443
self . diagnostic ( ) . struct_span_fatal_with_code ( sp, msg, code)
414
444
}
415
445
#[ rustc_lint_diagnostics]
446
+ #[ allow( rustc:: untranslatable_diagnostic) ]
447
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
416
448
pub fn struct_fatal ( & self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' _ , !> {
417
449
self . diagnostic ( ) . struct_fatal ( msg)
418
450
}
419
451
420
452
#[ rustc_lint_diagnostics]
453
+ #[ allow( rustc:: untranslatable_diagnostic) ]
454
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
421
455
pub fn span_fatal < S : Into < MultiSpan > > ( & self , sp : S , msg : impl Into < DiagnosticMessage > ) -> ! {
422
456
self . diagnostic ( ) . span_fatal ( sp, msg)
423
457
}
424
458
#[ rustc_lint_diagnostics]
459
+ #[ allow( rustc:: untranslatable_diagnostic) ]
460
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
425
461
pub fn span_fatal_with_code < S : Into < MultiSpan > > (
426
462
& self ,
427
463
sp : S ,
@@ -431,10 +467,14 @@ impl Session {
431
467
self . diagnostic ( ) . span_fatal_with_code ( sp, msg, code)
432
468
}
433
469
#[ rustc_lint_diagnostics]
470
+ #[ allow( rustc:: untranslatable_diagnostic) ]
471
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
434
472
pub fn fatal ( & self , msg : impl Into < DiagnosticMessage > ) -> ! {
435
473
self . diagnostic ( ) . fatal ( msg) . raise ( )
436
474
}
437
475
#[ rustc_lint_diagnostics]
476
+ #[ allow( rustc:: untranslatable_diagnostic) ]
477
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
438
478
pub fn span_err_or_warn < S : Into < MultiSpan > > (
439
479
& self ,
440
480
is_warning : bool ,
@@ -448,6 +488,8 @@ impl Session {
448
488
}
449
489
}
450
490
#[ rustc_lint_diagnostics]
491
+ #[ allow( rustc:: untranslatable_diagnostic) ]
492
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
451
493
pub fn span_err < S : Into < MultiSpan > > (
452
494
& self ,
453
495
sp : S ,
@@ -456,6 +498,8 @@ impl Session {
456
498
self . diagnostic ( ) . span_err ( sp, msg)
457
499
}
458
500
#[ rustc_lint_diagnostics]
501
+ #[ allow( rustc:: untranslatable_diagnostic) ]
502
+ #[ allow( rustc:: diagnostic_outside_of_impl) ]
459
503
pub fn span_err_with_code < S : Into < MultiSpan > > (
460
504
& self ,
461
505
sp : S ,
0 commit comments