@@ -7,7 +7,7 @@ use rustc_middle::traits::{ObligationCause, Reveal};
7
7
use rustc_middle:: ty:: {
8
8
self , Ty , TyCtxt , TypeFoldable , TypeFolder , TypeSuperVisitable , TypeVisitable , TypeVisitor ,
9
9
} ;
10
- use rustc_span:: { Span , DUMMY_SP } ;
10
+ use rustc_span:: Span ;
11
11
use rustc_trait_selection:: traits:: {
12
12
elaborate, normalize_param_env_or_error, outlives_bounds:: InferCtxtExt , ObligationCtxt ,
13
13
} ;
@@ -153,10 +153,7 @@ pub(super) fn check_refining_return_position_impl_trait_in_trait<'tcx>(
153
153
trait_m_sig. inputs_and_output ,
154
154
) ) ;
155
155
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)" ) ;
160
157
return ;
161
158
}
162
159
let outlives_env = OutlivesEnvironment :: with_bounds (
@@ -165,18 +162,12 @@ pub(super) fn check_refining_return_position_impl_trait_in_trait<'tcx>(
165
162
) ;
166
163
let errors = infcx. resolve_regions ( & outlives_env) ;
167
164
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)" ) ;
172
166
return ;
173
167
}
174
168
// Resolve any lifetime variables that may have been introduced during normalization.
175
169
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)" ) ;
180
171
return ;
181
172
} ;
182
173
0 commit comments