@@ -156,8 +156,9 @@ pub struct Body<'tcx> {
156156 /// A span representing this MIR, for error reporting.
157157 pub span : Span ,
158158
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 > > ,
161162
162163 /// The user may be writing e.g. &[(SOME_CELL, 42)][i].1 and this would get promoted, because
163164 /// we'd statically know that no thing with interior mutability will ever be available to the
@@ -206,7 +207,7 @@ impl<'tcx> Body<'tcx> {
206207 spread_arg : None ,
207208 var_debug_info,
208209 span,
209- uneval_consts : Vec :: new ( ) ,
210+ required_consts : Vec :: new ( ) ,
210211 ignore_interior_mut_in_const_validation : false ,
211212 control_flow_destroyed,
212213 predecessor_cache : PredecessorCache :: new ( ) ,
@@ -231,7 +232,7 @@ impl<'tcx> Body<'tcx> {
231232 arg_count : 0 ,
232233 spread_arg : None ,
233234 span : DUMMY_SP ,
234- uneval_consts : Vec :: new ( ) ,
235+ required_consts : Vec :: new ( ) ,
235236 control_flow_destroyed : Vec :: new ( ) ,
236237 generator_kind : None ,
237238 var_debug_info : Vec :: new ( ) ,
0 commit comments