@@ -7,7 +7,7 @@ use rustc_middle::traits::{ObligationCause, Reveal};
77use rustc_middle:: ty:: {
88 self , Ty , TyCtxt , TypeFoldable , TypeFolder , TypeSuperVisitable , TypeVisitable , TypeVisitor ,
99} ;
10- use rustc_span:: { Span , DUMMY_SP } ;
10+ use rustc_span:: Span ;
1111use rustc_trait_selection:: traits:: {
1212 elaborate, normalize_param_env_or_error, outlives_bounds:: InferCtxtExt , ObligationCtxt ,
1313} ;
@@ -153,10 +153,7 @@ pub(super) fn check_refining_return_position_impl_trait_in_trait<'tcx>(
153153 trait_m_sig. inputs_and_output ,
154154 ) ) ;
155155 if !ocx. select_all_or_error ( ) . is_empty ( ) {
156- tcx. dcx ( ) . span_delayed_bug (
157- DUMMY_SP ,
158- "encountered errors when checking RPITIT refinement (selection)" ,
159- ) ;
156+ tcx. dcx ( ) . delayed_bug ( "encountered errors when checking RPITIT refinement (selection)" ) ;
160157 return ;
161158 }
162159 let outlives_env = OutlivesEnvironment :: with_bounds (
@@ -165,18 +162,12 @@ pub(super) fn check_refining_return_position_impl_trait_in_trait<'tcx>(
165162 ) ;
166163 let errors = infcx. resolve_regions ( & outlives_env) ;
167164 if !errors. is_empty ( ) {
168- tcx. dcx ( ) . span_delayed_bug (
169- DUMMY_SP ,
170- "encountered errors when checking RPITIT refinement (regions)" ,
171- ) ;
165+ tcx. dcx ( ) . delayed_bug ( "encountered errors when checking RPITIT refinement (regions)" ) ;
172166 return ;
173167 }
174168 // Resolve any lifetime variables that may have been introduced during normalization.
175169 let Ok ( ( trait_bounds, impl_bounds) ) = infcx. fully_resolve ( ( trait_bounds, impl_bounds) ) else {
176- tcx. dcx ( ) . span_delayed_bug (
177- DUMMY_SP ,
178- "encountered errors when checking RPITIT refinement (resolution)" ,
179- ) ;
170+ tcx. dcx ( ) . delayed_bug ( "encountered errors when checking RPITIT refinement (resolution)" ) ;
180171 return ;
181172 } ;
182173
0 commit comments