2017-07-28 09:48:43 -05:00
|
|
|
|
|
|
|
#[derive(Debug, PartialEq, Copy, Clone)]
|
2017-08-09 07:53:22 -05:00
|
|
|
pub enum MemoryKind {
|
2017-07-28 09:48:43 -05:00
|
|
|
/// 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-08-09 07:53:22 -05:00
|
|
|
impl Into<::rustc_miri::interpret::MemoryKind<MemoryKind>> for MemoryKind {
|
|
|
|
fn into(self) -> ::rustc_miri::interpret::MemoryKind<MemoryKind> {
|
|
|
|
::rustc_miri::interpret::MemoryKind::Machine(self)
|
2017-07-28 09:48:43 -05:00
|
|
|
}
|
|
|
|
}
|