@@ -156,8 +156,9 @@ pub struct Body<'tcx> {
156
156
/// A span representing this MIR, for error reporting.
157
157
pub span : Span ,
158
158
159
- /// Unevaluated consts to evaluate them regardless of being optimized out
160
- pub uneval_consts : Vec < Constant < ' tcx > > ,
159
+ /// Constants that are required to evaluate successfully for this MIR to be well-formed.
160
+ /// We hold in this field all the constants we are not able to evaluate yet.
161
+ pub required_consts : Vec < Constant < ' tcx > > ,
161
162
162
163
/// The user may be writing e.g. &[(SOME_CELL, 42)][i].1 and this would get promoted, because
163
164
/// we'd statically know that no thing with interior mutability will ever be available to the
@@ -206,7 +207,7 @@ impl<'tcx> Body<'tcx> {
206
207
spread_arg : None ,
207
208
var_debug_info,
208
209
span,
209
- uneval_consts : Vec :: new ( ) ,
210
+ required_consts : Vec :: new ( ) ,
210
211
ignore_interior_mut_in_const_validation : false ,
211
212
control_flow_destroyed,
212
213
predecessor_cache : PredecessorCache :: new ( ) ,
@@ -231,7 +232,7 @@ impl<'tcx> Body<'tcx> {
231
232
arg_count : 0 ,
232
233
spread_arg : None ,
233
234
span : DUMMY_SP ,
234
- uneval_consts : Vec :: new ( ) ,
235
+ required_consts : Vec :: new ( ) ,
235
236
control_flow_destroyed : Vec :: new ( ) ,
236
237
generator_kind : None ,
237
238
var_debug_info : Vec :: new ( ) ,
0 commit comments