@@ -54,7 +54,7 @@ use rustc_data_structures::fx::FxHashMap;
5454use rustc_data_structures:: sorted_map:: SortedMap ;
5555use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
5656use rustc_data_structures:: sync:: Lrc ;
57- use rustc_errors:: { DiagnosticArgFromDisplay , Handler , StashKey } ;
57+ use rustc_errors:: { DiagnosticArgFromDisplay , StashKey } ;
5858use rustc_hir as hir;
5959use rustc_hir:: def:: { DefKind , LifetimeRes , Namespace , PartialRes , PerNS , Res } ;
6060use rustc_hir:: def_id:: { LocalDefId , CRATE_DEF_ID , LOCAL_CRATE } ;
@@ -763,10 +763,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
763763 self . resolver . get_import_res ( id) . present_items ( )
764764 }
765765
766- fn diagnostic ( & self ) -> & Handler {
767- self . tcx . sess . diagnostic ( )
768- }
769-
770766 /// Reuses the span but adds information like the kind of the desugaring and features that are
771767 /// allowed inside this span.
772768 fn mark_span_with_reason (
@@ -1326,7 +1322,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
13261322 let kind = match & t. kind {
13271323 TyKind :: Infer => hir:: TyKind :: Infer ,
13281324 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" ) )
13301326 }
13311327 // FIXME(unnamed_fields): IMPLEMENTATION IN PROGRESS
13321328 #[ allow( rustc:: untranslatable_diagnostic) ]
@@ -1510,7 +1506,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
15101506 }
15111507 TyKind :: MacCall ( _) => panic ! ( "`TyKind::MacCall` should have been expanded by now" ) ,
15121508 TyKind :: CVarArgs => {
1513- let guar = self . tcx . sess . delay_span_bug (
1509+ let guar = self . tcx . sess . span_delayed_bug (
15141510 t. span ,
15151511 "`TyKind::CVarArgs` should have been handled elsewhere" ,
15161512 ) ;
@@ -1653,7 +1649,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
16531649 } else {
16541650 self . tcx
16551651 . 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" ) ;
16571653 continue ;
16581654 }
16591655 }
@@ -2515,9 +2511,10 @@ impl<'hir> GenericArgsCtor<'hir> {
25152511 let hir_id = lcx. next_id ( ) ;
25162512
25172513 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+ ) ;
25212518 return ;
25222519 } ;
25232520
0 commit comments