deduplicate a lot of code

This commit is contained in:
b-naber
2022-04-21 19:35:06 +02:00
parent 28af967bb9
commit bc698c73e9
6 changed files with 119 additions and 244 deletions

View File

@@ -14,7 +14,7 @@ mod terminator;
mod traits;
mod util;
mod validity;
pub(crate) mod visitor;
mod visitor;
pub use rustc_middle::mir::interpret::*; // have all the `interpret` symbols in one place: here
@@ -27,7 +27,7 @@ pub use self::memory::{AllocCheck, AllocRef, AllocRefMut, FnVal, Memory, MemoryK
pub use self::operand::{ImmTy, Immediate, OpTy, Operand};
pub use self::place::{MPlaceTy, MemPlace, MemPlaceMeta, Place, PlaceTy};
pub use self::validity::{CtfeValidationMode, RefTracking};
pub use self::visitor::{MutValueVisitor, ValueVisitor};
pub use self::visitor::{MutValueVisitor, Value, ValueVisitor};
crate use self::intrinsics::eval_nullary_intrinsic;
use eval_context::{from_known_layout, mir_assign_valid_types};