rust/miri/memory.rs

17 lines
459 B
Rust
Raw Normal View History

#[derive(Debug, PartialEq, Copy, Clone)]
pub enum MemoryKind {
/// Error if deallocated any other way than `rust_deallocate`
Rust,
/// Error if deallocated any other way than `free`
C,
/// Part of env var emulation
Env,
}
2017-12-14 04:03:55 -06:00
impl Into<::rustc_mir::interpret::MemoryKind<MemoryKind>> for MemoryKind {
fn into(self) -> ::rustc_mir::interpret::MemoryKind<MemoryKind> {
::rustc_mir::interpret::MemoryKind::Machine(self)
}
}