@@ -54,7 +54,7 @@ use rustc_data_structures::fx::FxHashMap;
54
54
use rustc_data_structures:: sorted_map:: SortedMap ;
55
55
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
56
56
use rustc_data_structures:: sync:: Lrc ;
57
- use rustc_errors:: { DiagnosticArgFromDisplay , Handler , StashKey } ;
57
+ use rustc_errors:: { DiagnosticArgFromDisplay , StashKey } ;
58
58
use rustc_hir as hir;
59
59
use rustc_hir:: def:: { DefKind , LifetimeRes , Namespace , PartialRes , PerNS , Res } ;
60
60
use rustc_hir:: def_id:: { LocalDefId , CRATE_DEF_ID , LOCAL_CRATE } ;
@@ -763,10 +763,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
763
763
self . resolver . get_import_res ( id) . present_items ( )
764
764
}
765
765
766
- fn diagnostic ( & self ) -> & Handler {
767
- self . tcx . sess . diagnostic ( )
768
- }
769
-
770
766
/// Reuses the span but adds information like the kind of the desugaring and features that are
771
767
/// allowed inside this span.
772
768
fn mark_span_with_reason (
@@ -1326,7 +1322,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1326
1322
let kind = match & t. kind {
1327
1323
TyKind :: Infer => hir:: TyKind :: Infer ,
1328
1324
TyKind :: Err => {
1329
- hir:: TyKind :: Err ( self . tcx . sess . delay_span_bug ( t. span , "TyKind::Err lowered" ) )
1325
+ hir:: TyKind :: Err ( self . tcx . sess . span_delayed_bug ( t. span , "TyKind::Err lowered" ) )
1330
1326
}
1331
1327
// FIXME(unnamed_fields): IMPLEMENTATION IN PROGRESS
1332
1328
#[ allow( rustc:: untranslatable_diagnostic) ]
@@ -1510,7 +1506,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1510
1506
}
1511
1507
TyKind :: MacCall ( _) => panic ! ( "`TyKind::MacCall` should have been expanded by now" ) ,
1512
1508
TyKind :: CVarArgs => {
1513
- let guar = self . tcx . sess . delay_span_bug (
1509
+ let guar = self . tcx . sess . span_delayed_bug (
1514
1510
t. span ,
1515
1511
"`TyKind::CVarArgs` should have been handled elsewhere" ,
1516
1512
) ;
@@ -1653,7 +1649,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1653
1649
} else {
1654
1650
self . tcx
1655
1651
. sess
1656
- . delay_span_bug ( lifetime. ident . span , "no def-id for fresh lifetime" ) ;
1652
+ . span_delayed_bug ( lifetime. ident . span , "no def-id for fresh lifetime" ) ;
1657
1653
continue ;
1658
1654
}
1659
1655
}
@@ -2515,9 +2511,10 @@ impl<'hir> GenericArgsCtor<'hir> {
2515
2511
let hir_id = lcx. next_id ( ) ;
2516
2512
2517
2513
let Some ( host_param_id) = lcx. host_param_id else {
2518
- lcx. tcx
2519
- . sess
2520
- . delay_span_bug ( span, "no host param id for call in const yet no errors reported" ) ;
2514
+ lcx. tcx . sess . span_delayed_bug (
2515
+ span,
2516
+ "no host param id for call in const yet no errors reported" ,
2517
+ ) ;
2521
2518
return ;
2522
2519
} ;
2523
2520
0 commit comments