about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--miri/lib.rs6
-rw-r--r--src/librustc_mir/interpret/memory.rs8
-rw-r--r--src/librustc_mir/interpret/mod.rs2
3 files changed, 8 insertions, 8 deletions
diff --git a/miri/lib.rs b/miri/lib.rs
index 204746244c8..159f8035f2c 100644
--- a/miri/lib.rs
+++ b/miri/lib.rs
@@ -146,9 +146,9 @@ pub fn eval_main<'a, 'tcx: 'a>(
     }
 }
 
-struct Evaluator;
+pub struct Evaluator;
 #[derive(Default)]
-struct EvaluatorData {
+pub struct EvaluatorData {
     /// Environment variables set by `setenv`
     /// Miri does not expose env vars from the host to the emulated program
     pub(crate) env_vars: HashMap<Vec<u8>, MemoryPointer>,
@@ -163,7 +163,7 @@ pub struct TlsEntry<'tcx> {
 }
 
 #[derive(Default)]
-struct MemoryData<'tcx> {
+pub struct MemoryData<'tcx> {
     /// The Key to use for the next thread-local allocation.
     next_thread_local: TlsKey,
 
diff --git a/src/librustc_mir/interpret/memory.rs b/src/librustc_mir/interpret/memory.rs
index 9930555c199..4c441460cb5 100644
--- a/src/librustc_mir/interpret/memory.rs
+++ b/src/librustc_mir/interpret/memory.rs
@@ -79,7 +79,7 @@ impl LockInfo {
 pub struct AllocId(u64);
 
 #[derive(Debug)]
-enum AllocIdKind {
+pub enum AllocIdKind {
     /// We can't ever have more than `usize::max_value` functions at the same time
     /// since we never "deallocate" functions
     Function(usize),
@@ -89,7 +89,7 @@ enum AllocIdKind {
 }
 
 impl AllocIdKind {
-    fn into_alloc_id(self) -> AllocId {
+    pub fn into_alloc_id(self) -> AllocId {
         match self {
             AllocIdKind::Function(n) => AllocId(n as u64),
             AllocIdKind::Runtime(n) => AllocId((1 << 63) | n),
@@ -103,10 +103,10 @@ impl AllocId {
         self.0 >> 63
     }
     /// Yields everything but the discriminant bits
-    fn index(self) -> u64 {
+    pub fn index(self) -> u64 {
         self.0 & ((1 << 63) - 1)
     }
-    fn into_alloc_id_kind(self) -> AllocIdKind {
+    pub fn into_alloc_id_kind(self) -> AllocIdKind {
         match self.discriminant() {
             0 => AllocIdKind::Function(self.index() as usize),
             1 => AllocIdKind::Runtime(self.index()),
diff --git a/src/librustc_mir/interpret/mod.rs b/src/librustc_mir/interpret/mod.rs
index 3a5fdf273a4..603451a9442 100644
--- a/src/librustc_mir/interpret/mod.rs
+++ b/src/librustc_mir/interpret/mod.rs
@@ -27,7 +27,7 @@ pub use self::eval_context::{EvalContext, Frame, ResourceLimits, StackPopCleanup
 
 pub use self::lvalue::{Lvalue, LvalueExtra, GlobalId};
 
-pub use self::memory::{AllocId, Memory, MemoryPointer, MemoryKind, HasMemory};
+pub use self::memory::{AllocId, Memory, MemoryPointer, MemoryKind, HasMemory, AllocIdKind};
 
 use self::memory::{PointerArithmetic, Lock, AccessKind};