Skip to main content

rustc_const_eval/interpret/
mod.rs

1//! An interpreter for MIR used in CTFE and by miri
2
3mod call;
4mod cast;
5mod discriminant;
6mod eval_context;
7mod intern;
8mod intrinsics;
9mod machine;
10mod memory;
11mod operand;
12mod operator;
13mod place;
14mod projection;
15mod stack;
16mod step;
17mod traits;
18mod util;
19mod validity;
20mod visitor;
21
22#[doc(no_inline)]
23pub use rustc_middle::mir::interpret::*; // have all the `interpret` symbols in one place: here
24
25pub use self::call::FnArg;
26pub use self::eval_context::InterpCx;
27use self::eval_context::{from_known_layout, mir_assign_valid_types};
28pub use self::intern::{
29    HasStaticRootDefId, InternError, InternKind, intern_const_alloc_for_constprop,
30    intern_const_alloc_recursive,
31};
32pub use self::machine::{
33    AllocMap, Machine, MayLeak, RetagMode, ReturnAction, compile_time_machine,
34};
35pub use self::memory::{AllocInfo, AllocKind, AllocRef, AllocRefMut, FnVal, Memory, MemoryKind};
36use self::operand::Operand;
37pub use self::operand::{ImmTy, Immediate, OpTy};
38pub use self::operator::AtomicRmwOp;
39pub use self::place::{MPlaceTy, MemPlaceMeta, PlaceTy, Writeable};
40use self::place::{MemPlace, Place};
41pub use self::projection::{OffsetMode, Projectable};
42pub use self::stack::{Frame, FrameInfo, LocalState, ReturnContinuation};
43pub use self::util::EnteredTraceSpan;
44pub(crate) use self::util::{
45    create_static_alloc, ensure_monomorphic_enough, type_implements_dyn_trait,
46};
47pub use self::validity::{CtfeValidationMode, RangeSet, RefTracking};
48pub use self::visitor::ValueVisitor;