Skip to content

Commit f862792

Browse files
authored
Rollup merge of rust-lang#59430 - kenta7777:rename-evalcontext-to-interpretcx, r=oli-obk
Renames `EvalContext` to `InterpretCx` This PR renames `EvalContext` to `InterpretCx` in `src/librustc_mir`. This PR is related to rust-lang#54395 .
2 parents f59ee13 + 892f7c4 commit f862792

16 files changed

+72
-72
lines changed

src/librustc/mir/interpret/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ impl<'tcx> AllocMap<'tcx> {
344344
}
345345
}
346346

347-
/// Returns `None` in case the `AllocId` is dangling. An `EvalContext` can still have a
347+
/// Returns `None` in case the `AllocId` is dangling. An `InterpretCx` can still have a
348348
/// local `Allocation` for that `AllocId`, but having such an `AllocId` in a constant is
349349
/// illegal and will likely ICE.
350350
/// This function exists to allow const eval to detect the difference between evaluation-

src/librustc_mir/const_eval.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use syntax::source_map::{Span, DUMMY_SP};
2222
use crate::interpret::{self,
2323
PlaceTy, MPlaceTy, MemPlace, OpTy, ImmTy, Immediate, Scalar, Pointer,
2424
RawConst, ConstValue,
25-
EvalResult, EvalError, EvalErrorKind, GlobalId, EvalContext, StackPopCleanup,
25+
EvalResult, EvalError, EvalErrorKind, GlobalId, InterpretCx, StackPopCleanup,
2626
Allocation, AllocId, MemoryKind,
2727
snapshot, RefTracking,
2828
};
@@ -34,7 +34,7 @@ const STEPS_UNTIL_DETECTOR_ENABLED: isize = 1_000_000;
3434
/// Should be a power of two for performance reasons.
3535
const DETECTOR_SNAPSHOT_PERIOD: isize = 256;
3636

37-
/// The `EvalContext` is only meant to be used to do field and index projections into constants for
37+
/// The `InterpretCx` is only meant to be used to do field and index projections into constants for
3838
/// `simd_shuffle` and const patterns in match arms.
3939
///
4040
/// The function containing the `match` that is currently being analyzed may have generic bounds
@@ -47,7 +47,7 @@ pub(crate) fn mk_eval_cx<'a, 'mir, 'tcx>(
4747
param_env: ty::ParamEnv<'tcx>,
4848
) -> CompileTimeEvalContext<'a, 'mir, 'tcx> {
4949
debug!("mk_eval_cx: {:?}", param_env);
50-
EvalContext::new(tcx.at(span), param_env, CompileTimeInterpreter::new())
50+
InterpretCx::new(tcx.at(span), param_env, CompileTimeInterpreter::new())
5151
}
5252

5353
pub(crate) fn eval_promoted<'a, 'mir, 'tcx>(
@@ -116,7 +116,7 @@ fn eval_body_and_ecx<'a, 'mir, 'tcx>(
116116
// and try improving it down the road when more information is available
117117
let span = tcx.def_span(cid.instance.def_id());
118118
let span = mir.map(|mir| mir.span).unwrap_or(span);
119-
let mut ecx = EvalContext::new(tcx.at(span), param_env, CompileTimeInterpreter::new());
119+
let mut ecx = InterpretCx::new(tcx.at(span), param_env, CompileTimeInterpreter::new());
120120
let r = eval_body_using_ecx(&mut ecx, cid, mir, param_env);
121121
(r, ecx)
122122
}
@@ -292,7 +292,7 @@ impl<K: Hash + Eq, V> interpret::AllocMap<K, V> for FxHashMap<K, V> {
292292
}
293293

294294
type CompileTimeEvalContext<'a, 'mir, 'tcx> =
295-
EvalContext<'a, 'mir, 'tcx, CompileTimeInterpreter<'a, 'mir, 'tcx>>;
295+
InterpretCx<'a, 'mir, 'tcx, CompileTimeInterpreter<'a, 'mir, 'tcx>>;
296296

297297
impl interpret::MayLeak for ! {
298298
#[inline(always)]
@@ -317,12 +317,12 @@ impl<'a, 'mir, 'tcx> interpret::Machine<'a, 'mir, 'tcx>
317317
const STATIC_KIND: Option<!> = None; // no copying of statics allowed
318318

319319
#[inline(always)]
320-
fn enforce_validity(_ecx: &EvalContext<'a, 'mir, 'tcx, Self>) -> bool {
320+
fn enforce_validity(_ecx: &InterpretCx<'a, 'mir, 'tcx, Self>) -> bool {
321321
false // for now, we don't enforce validity
322322
}
323323

324324
fn find_fn(
325-
ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
325+
ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
326326
instance: ty::Instance<'tcx>,
327327
args: &[OpTy<'tcx>],
328328
dest: Option<PlaceTy<'tcx>>,
@@ -362,7 +362,7 @@ impl<'a, 'mir, 'tcx> interpret::Machine<'a, 'mir, 'tcx>
362362
}
363363

364364
fn call_intrinsic(
365-
ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
365+
ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
366366
instance: ty::Instance<'tcx>,
367367
args: &[OpTy<'tcx>],
368368
dest: PlaceTy<'tcx>,
@@ -378,7 +378,7 @@ impl<'a, 'mir, 'tcx> interpret::Machine<'a, 'mir, 'tcx>
378378
}
379379

380380
fn ptr_op(
381-
_ecx: &EvalContext<'a, 'mir, 'tcx, Self>,
381+
_ecx: &InterpretCx<'a, 'mir, 'tcx, Self>,
382382
_bin_op: mir::BinOp,
383383
_left: ImmTy<'tcx>,
384384
_right: ImmTy<'tcx>,
@@ -406,15 +406,15 @@ impl<'a, 'mir, 'tcx> interpret::Machine<'a, 'mir, 'tcx>
406406
}
407407

408408
fn box_alloc(
409-
_ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
409+
_ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
410410
_dest: PlaceTy<'tcx>,
411411
) -> EvalResult<'tcx> {
412412
Err(
413413
ConstEvalError::NeedsRfc("heap allocations via `box` keyword".to_string()).into(),
414414
)
415415
}
416416

417-
fn before_terminator(ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>) -> EvalResult<'tcx> {
417+
fn before_terminator(ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>) -> EvalResult<'tcx> {
418418
{
419419
let steps = &mut ecx.machine.steps_since_detector_enabled;
420420

@@ -440,7 +440,7 @@ impl<'a, 'mir, 'tcx> interpret::Machine<'a, 'mir, 'tcx>
440440

441441
#[inline(always)]
442442
fn tag_new_allocation(
443-
_ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
443+
_ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
444444
ptr: Pointer,
445445
_kind: MemoryKind<Self::MemoryKinds>,
446446
) -> Pointer {
@@ -449,15 +449,15 @@ impl<'a, 'mir, 'tcx> interpret::Machine<'a, 'mir, 'tcx>
449449

450450
#[inline(always)]
451451
fn stack_push(
452-
_ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
452+
_ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
453453
) -> EvalResult<'tcx> {
454454
Ok(())
455455
}
456456

457457
/// Called immediately before a stack frame gets popped.
458458
#[inline(always)]
459459
fn stack_pop(
460-
_ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
460+
_ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
461461
_extra: (),
462462
) -> EvalResult<'tcx> {
463463
Ok(())
@@ -504,7 +504,7 @@ pub fn const_variant_index<'a, 'tcx>(
504504
}
505505

506506
pub fn error_to_const_error<'a, 'mir, 'tcx>(
507-
ecx: &EvalContext<'a, 'mir, 'tcx, CompileTimeInterpreter<'a, 'mir, 'tcx>>,
507+
ecx: &InterpretCx<'a, 'mir, 'tcx, CompileTimeInterpreter<'a, 'mir, 'tcx>>,
508508
mut error: EvalError<'tcx>
509509
) -> ConstEvalErr<'tcx> {
510510
error.print_backtrace();

src/librustc_mir/interpret/cast.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ use rustc::mir::interpret::{
99
use rustc::mir::CastKind;
1010
use rustc_apfloat::Float;
1111

12-
use super::{EvalContext, Machine, PlaceTy, OpTy, ImmTy, Immediate};
12+
use super::{InterpretCx, Machine, PlaceTy, OpTy, ImmTy, Immediate};
1313

14-
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
14+
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M> {
1515
fn type_is_fat_ptr(&self, ty: Ty<'tcx>) -> bool {
1616
match ty.sty {
1717
ty::RawPtr(ty::TypeAndMut { ty, .. }) |

src/librustc_mir/interpret/eval_context.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use super::{
2626
Memory, Machine
2727
};
2828

29-
pub struct EvalContext<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'a, 'mir, 'tcx>> {
29+
pub struct InterpretCx<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'a, 'mir, 'tcx>> {
3030
/// Stores the `Machine` instance.
3131
pub machine: M,
3232

@@ -141,15 +141,15 @@ impl<'tcx, Tag> LocalState<'tcx, Tag> {
141141
}
142142

143143
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> HasDataLayout
144-
for EvalContext<'a, 'mir, 'tcx, M>
144+
for InterpretCx<'a, 'mir, 'tcx, M>
145145
{
146146
#[inline]
147147
fn data_layout(&self) -> &layout::TargetDataLayout {
148148
&self.tcx.data_layout
149149
}
150150
}
151151

152-
impl<'a, 'mir, 'tcx, M> layout::HasTyCtxt<'tcx> for EvalContext<'a, 'mir, 'tcx, M>
152+
impl<'a, 'mir, 'tcx, M> layout::HasTyCtxt<'tcx> for InterpretCx<'a, 'mir, 'tcx, M>
153153
where M: Machine<'a, 'mir, 'tcx>
154154
{
155155
#[inline]
@@ -159,7 +159,7 @@ impl<'a, 'mir, 'tcx, M> layout::HasTyCtxt<'tcx> for EvalContext<'a, 'mir, 'tcx,
159159
}
160160

161161
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> LayoutOf
162-
for EvalContext<'a, 'mir, 'tcx, M>
162+
for InterpretCx<'a, 'mir, 'tcx, M>
163163
{
164164
type Ty = Ty<'tcx>;
165165
type TyLayout = EvalResult<'tcx, TyLayout<'tcx>>;
@@ -171,13 +171,13 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> LayoutOf
171171
}
172172
}
173173

174-
impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
174+
impl<'a, 'mir, 'tcx: 'mir, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M> {
175175
pub fn new(
176176
tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
177177
param_env: ty::ParamEnv<'tcx>,
178178
machine: M,
179179
) -> Self {
180-
EvalContext {
180+
InterpretCx {
181181
machine,
182182
tcx,
183183
param_env,

src/librustc_mir/interpret/intrinsics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use rustc::mir::interpret::{
1111
};
1212

1313
use super::{
14-
Machine, PlaceTy, OpTy, EvalContext,
14+
Machine, PlaceTy, OpTy, InterpretCx,
1515
};
1616

1717

@@ -36,7 +36,7 @@ fn numeric_intrinsic<'tcx, Tag>(
3636
Ok(Scalar::from_uint(bits_out, size))
3737
}
3838

39-
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
39+
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M> {
4040
/// Returns `true` if emulation happened.
4141
pub fn emulate_intrinsic(
4242
&mut self,

src/librustc_mir/interpret/machine.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use rustc::ty::{self, query::TyCtxtAt};
1111

1212
use super::{
1313
Allocation, AllocId, EvalResult, Scalar, AllocationExtra,
14-
EvalContext, PlaceTy, MPlaceTy, OpTy, ImmTy, Pointer, MemoryKind,
14+
InterpretCx, PlaceTy, MPlaceTy, OpTy, ImmTy, Pointer, MemoryKind,
1515
};
1616

1717
/// Whether this kind of memory is allowed to leak
@@ -95,11 +95,11 @@ pub trait Machine<'a, 'mir, 'tcx>: Sized {
9595
const STATIC_KIND: Option<Self::MemoryKinds>;
9696

9797
/// Whether to enforce the validity invariant
98-
fn enforce_validity(ecx: &EvalContext<'a, 'mir, 'tcx, Self>) -> bool;
98+
fn enforce_validity(ecx: &InterpretCx<'a, 'mir, 'tcx, Self>) -> bool;
9999

100100
/// Called before a basic block terminator is executed.
101101
/// You can use this to detect endlessly running programs.
102-
fn before_terminator(ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>) -> EvalResult<'tcx>;
102+
fn before_terminator(ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>) -> EvalResult<'tcx>;
103103

104104
/// Entry point to all function calls.
105105
///
@@ -112,7 +112,7 @@ pub trait Machine<'a, 'mir, 'tcx>: Sized {
112112
/// Passing `dest`and `ret` in the same `Option` proved very annoying when only one of them
113113
/// was used.
114114
fn find_fn(
115-
ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
115+
ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
116116
instance: ty::Instance<'tcx>,
117117
args: &[OpTy<'tcx, Self::PointerTag>],
118118
dest: Option<PlaceTy<'tcx, Self::PointerTag>>,
@@ -122,7 +122,7 @@ pub trait Machine<'a, 'mir, 'tcx>: Sized {
122122
/// Directly process an intrinsic without pushing a stack frame.
123123
/// If this returns successfully, the engine will take care of jumping to the next block.
124124
fn call_intrinsic(
125-
ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
125+
ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
126126
instance: ty::Instance<'tcx>,
127127
args: &[OpTy<'tcx, Self::PointerTag>],
128128
dest: PlaceTy<'tcx, Self::PointerTag>,
@@ -156,21 +156,21 @@ pub trait Machine<'a, 'mir, 'tcx>: Sized {
156156
///
157157
/// Returns a (value, overflowed) pair if the operation succeeded
158158
fn ptr_op(
159-
ecx: &EvalContext<'a, 'mir, 'tcx, Self>,
159+
ecx: &InterpretCx<'a, 'mir, 'tcx, Self>,
160160
bin_op: mir::BinOp,
161161
left: ImmTy<'tcx, Self::PointerTag>,
162162
right: ImmTy<'tcx, Self::PointerTag>,
163163
) -> EvalResult<'tcx, (Scalar<Self::PointerTag>, bool)>;
164164

165165
/// Heap allocations via the `box` keyword.
166166
fn box_alloc(
167-
ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
167+
ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
168168
dest: PlaceTy<'tcx, Self::PointerTag>,
169169
) -> EvalResult<'tcx>;
170170

171171
/// Adds the tag for a newly allocated pointer.
172172
fn tag_new_allocation(
173-
ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
173+
ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
174174
ptr: Pointer,
175175
kind: MemoryKind<Self::MemoryKinds>,
176176
) -> Pointer<Self::PointerTag>;
@@ -180,7 +180,7 @@ pub trait Machine<'a, 'mir, 'tcx>: Sized {
180180
/// `mutability` can be `None` in case a raw ptr is being dereferenced.
181181
#[inline]
182182
fn tag_dereference(
183-
_ecx: &EvalContext<'a, 'mir, 'tcx, Self>,
183+
_ecx: &InterpretCx<'a, 'mir, 'tcx, Self>,
184184
place: MPlaceTy<'tcx, Self::PointerTag>,
185185
_mutability: Option<hir::Mutability>,
186186
) -> EvalResult<'tcx, Scalar<Self::PointerTag>> {
@@ -190,7 +190,7 @@ pub trait Machine<'a, 'mir, 'tcx>: Sized {
190190
/// Executes a retagging operation
191191
#[inline]
192192
fn retag(
193-
_ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
193+
_ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
194194
_kind: mir::RetagKind,
195195
_place: PlaceTy<'tcx, Self::PointerTag>,
196196
) -> EvalResult<'tcx> {
@@ -199,12 +199,12 @@ pub trait Machine<'a, 'mir, 'tcx>: Sized {
199199

200200
/// Called immediately before a new stack frame got pushed
201201
fn stack_push(
202-
ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
202+
ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
203203
) -> EvalResult<'tcx, Self::FrameExtra>;
204204

205205
/// Called immediately after a stack frame gets popped
206206
fn stack_pop(
207-
ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
207+
ecx: &mut InterpretCx<'a, 'mir, 'tcx, Self>,
208208
extra: Self::FrameExtra,
209209
) -> EvalResult<'tcx>;
210210
}

src/librustc_mir/interpret/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mod visitor;
1818
pub use rustc::mir::interpret::*; // have all the `interpret` symbols in one place: here
1919

2020
pub use self::eval_context::{
21-
EvalContext, Frame, StackPopCleanup, LocalState, LocalValue,
21+
InterpretCx, Frame, StackPopCleanup, LocalState, LocalValue,
2222
};
2323

2424
pub use self::place::{Place, PlaceTy, MemPlace, MPlaceTy};

src/librustc_mir/interpret/operand.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rustc::mir::interpret::{
1313
sign_extend, truncate,
1414
};
1515
use super::{
16-
EvalContext, Machine,
16+
InterpretCx, Machine,
1717
MemPlace, MPlaceTy, PlaceTy, Place, MemoryKind,
1818
};
1919
pub use rustc::mir::interpret::ScalarMaybeUndef;
@@ -267,7 +267,7 @@ pub(super) fn from_known_layout<'tcx>(
267267
}
268268
}
269269

270-
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
270+
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M> {
271271
/// Try reading an immediate in memory; this is interesting particularly for ScalarPair.
272272
/// Returns `None` if the layout does not permit loading this as a value.
273273
fn try_read_immediate_from_mplace(

src/librustc_mir/interpret/operator.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use rustc_apfloat::ieee::{Double, Single};
55
use rustc_apfloat::Float;
66
use rustc::mir::interpret::{EvalResult, Scalar};
77

8-
use super::{EvalContext, PlaceTy, Immediate, Machine, ImmTy};
8+
use super::{InterpretCx, PlaceTy, Immediate, Machine, ImmTy};
99

1010

11-
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
11+
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M> {
1212
/// Applies the binary operation `op` to the two operands and writes a tuple of the result
1313
/// and a boolean signifying the potential overflow to the destination.
1414
pub fn binop_with_overflow(
@@ -37,7 +37,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
3737
}
3838
}
3939

40-
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
40+
impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> InterpretCx<'a, 'mir, 'tcx, M> {
4141
fn binary_char_op(
4242
&self,
4343
bin_op: mir::BinOp,

src/librustc_mir/interpret/place.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use rustc::ty::TypeFoldable;
1414

1515
use super::{
1616
GlobalId, AllocId, Allocation, Scalar, EvalResult, Pointer, PointerArithmetic,
17-
EvalContext, Machine, AllocMap, AllocationExtra,
17+
InterpretCx, Machine, AllocMap, AllocationExtra,
1818
RawConst, Immediate, ImmTy, ScalarMaybeUndef, Operand, OpTy, MemoryKind
1919
};
2020

@@ -305,7 +305,7 @@ impl<'tcx, Tag: ::std::fmt::Debug> PlaceTy<'tcx, Tag> {
305305
}
306306

307307
// separating the pointer tag for `impl Trait`, see https://github.com/rust-lang/rust/issues/54385
308-
impl<'a, 'mir, 'tcx, Tag, M> EvalContext<'a, 'mir, 'tcx, M>
308+
impl<'a, 'mir, 'tcx, Tag, M> InterpretCx<'a, 'mir, 'tcx, M>
309309
where
310310
// FIXME: Working around https://github.com/rust-lang/rust/issues/54385
311311
Tag: ::std::fmt::Debug+Default+Copy+Eq+Hash+'static,
@@ -607,7 +607,7 @@ where
607607
// global table but not in its local memory: It calls back into tcx through
608608
// a query, triggering the CTFE machinery to actually turn this lazy reference
609609
// into a bunch of bytes. IOW, statics are evaluated with CTFE even when
610-
// this EvalContext uses another Machine (e.g., in miri). This is what we
610+
// this InterpretCx uses another Machine (e.g., in miri). This is what we
611611
// want! This way, computing statics works concistently between codegen
612612
// and miri: They use the same query to eventually obtain a `ty::Const`
613613
// and use that for further computation.

0 commit comments

Comments
 (0)