@@ -31,10 +31,10 @@ use crate::CTRL_C_RECEIVED;
31
31
32
32
// Returns a pointer to where the result lives
33
33
#[ instrument( level = "trace" , skip( ecx, body) ) ]
34
- fn eval_body_using_ecx < ' mir , ' tcx , R : InterpretationResult < ' tcx > > (
35
- ecx : & mut CompileTimeEvalContext < ' mir , ' tcx > ,
34
+ fn eval_body_using_ecx < ' tcx , R : InterpretationResult < ' tcx > > (
35
+ ecx : & mut CompileTimeEvalContext < ' tcx > ,
36
36
cid : GlobalId < ' tcx > ,
37
- body : & ' mir mir:: Body < ' tcx > ,
37
+ body : & ' tcx mir:: Body < ' tcx > ,
38
38
) -> InterpResult < ' tcx , R > {
39
39
trace ! ( ?ecx. param_env) ;
40
40
let tcx = * ecx. tcx ;
@@ -134,12 +134,12 @@ fn eval_body_using_ecx<'mir, 'tcx, R: InterpretationResult<'tcx>>(
134
134
/// that inform us about the generic bounds of the constant. E.g., using an associated constant
135
135
/// of a function's generic parameter will require knowledge about the bounds on the generic
136
136
/// parameter. These bounds are passed to `mk_eval_cx` via the `ParamEnv` argument.
137
- pub ( crate ) fn mk_eval_cx_to_read_const_val < ' mir , ' tcx > (
137
+ pub ( crate ) fn mk_eval_cx_to_read_const_val < ' tcx > (
138
138
tcx : TyCtxt < ' tcx > ,
139
139
root_span : Span ,
140
140
param_env : ty:: ParamEnv < ' tcx > ,
141
141
can_access_mut_global : CanAccessMutGlobal ,
142
- ) -> CompileTimeEvalContext < ' mir , ' tcx > {
142
+ ) -> CompileTimeEvalContext < ' tcx > {
143
143
debug ! ( "mk_eval_cx: {:?}" , param_env) ;
144
144
InterpCx :: new (
145
145
tcx,
@@ -151,12 +151,12 @@ pub(crate) fn mk_eval_cx_to_read_const_val<'mir, 'tcx>(
151
151
152
152
/// Create an interpreter context to inspect the given `ConstValue`.
153
153
/// Returns both the context and an `OpTy` that represents the constant.
154
- pub fn mk_eval_cx_for_const_val < ' mir , ' tcx > (
154
+ pub fn mk_eval_cx_for_const_val < ' tcx > (
155
155
tcx : TyCtxtAt < ' tcx > ,
156
156
param_env : ty:: ParamEnv < ' tcx > ,
157
157
val : mir:: ConstValue < ' tcx > ,
158
158
ty : Ty < ' tcx > ,
159
- ) -> Option < ( CompileTimeEvalContext < ' mir , ' tcx > , OpTy < ' tcx > ) > {
159
+ ) -> Option < ( CompileTimeEvalContext < ' tcx > , OpTy < ' tcx > ) > {
160
160
let ecx = mk_eval_cx_to_read_const_val ( tcx. tcx , tcx. span , param_env, CanAccessMutGlobal :: No ) ;
161
161
let op = ecx. const_val_to_op ( val, ty, None ) . ok ( ) ?;
162
162
Some ( ( ecx, op) )
@@ -170,7 +170,7 @@ pub fn mk_eval_cx_for_const_val<'mir, 'tcx>(
170
170
/// encounter an `Indirect` they cannot handle.
171
171
#[ instrument( skip( ecx) , level = "debug" ) ]
172
172
pub ( super ) fn op_to_const < ' tcx > (
173
- ecx : & CompileTimeEvalContext < ' _ , ' tcx > ,
173
+ ecx : & CompileTimeEvalContext < ' tcx > ,
174
174
op : & OpTy < ' tcx > ,
175
175
for_diagnostics : bool ,
176
176
) -> ConstValue < ' tcx > {
@@ -326,16 +326,16 @@ pub trait InterpretationResult<'tcx> {
326
326
/// This function takes the place where the result of the evaluation is stored
327
327
/// and prepares it for returning it in the appropriate format needed by the specific
328
328
/// evaluation query.
329
- fn make_result < ' mir > (
329
+ fn make_result (
330
330
mplace : MPlaceTy < ' tcx > ,
331
- ecx : & mut InterpCx < ' mir , ' tcx , CompileTimeInterpreter < ' mir , ' tcx > > ,
331
+ ecx : & mut InterpCx < ' tcx , CompileTimeInterpreter < ' tcx > > ,
332
332
) -> Self ;
333
333
}
334
334
335
335
impl < ' tcx > InterpretationResult < ' tcx > for ConstAlloc < ' tcx > {
336
- fn make_result < ' mir > (
336
+ fn make_result (
337
337
mplace : MPlaceTy < ' tcx > ,
338
- _ecx : & mut InterpCx < ' mir , ' tcx , CompileTimeInterpreter < ' mir , ' tcx > > ,
338
+ _ecx : & mut InterpCx < ' tcx , CompileTimeInterpreter < ' tcx > > ,
339
339
) -> Self {
340
340
ConstAlloc { alloc_id : mplace. ptr ( ) . provenance . unwrap ( ) . alloc_id ( ) , ty : mplace. layout . ty }
341
341
}
@@ -416,8 +416,8 @@ fn eval_in_interpreter<'tcx, R: InterpretationResult<'tcx>>(
416
416
}
417
417
418
418
#[ inline( always) ]
419
- fn const_validate_mplace < ' mir , ' tcx > (
420
- ecx : & InterpCx < ' mir , ' tcx , CompileTimeInterpreter < ' mir , ' tcx > > ,
419
+ fn const_validate_mplace < ' tcx > (
420
+ ecx : & InterpCx < ' tcx , CompileTimeInterpreter < ' tcx > > ,
421
421
mplace : & MPlaceTy < ' tcx > ,
422
422
cid : GlobalId < ' tcx > ,
423
423
) -> Result < ( ) , ErrorHandled > {
@@ -446,8 +446,8 @@ fn const_validate_mplace<'mir, 'tcx>(
446
446
}
447
447
448
448
#[ inline( always) ]
449
- fn report_validation_error < ' mir , ' tcx > (
450
- ecx : & InterpCx < ' mir , ' tcx , CompileTimeInterpreter < ' mir , ' tcx > > ,
449
+ fn report_validation_error < ' tcx > (
450
+ ecx : & InterpCx < ' tcx , CompileTimeInterpreter < ' tcx > > ,
451
451
error : InterpErrorInfo < ' tcx > ,
452
452
alloc_id : AllocId ,
453
453
) -> ErrorHandled {
0 commit comments