about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-08-20 14:58:10 +0200
committerRalf Jung <post@ralfj.de>2024-08-20 14:58:10 +0200
commit38af7b068f506019a3aaa7c107e22bc1395f7b27 (patch)
treef562c3f0c0737405ac7f8b148a2c88b4757fc0b0
parente3f909b2bbd0b10db6f164d466db237c582d3045 (diff)
downloadrust-38af7b068f506019a3aaa7c107e22bc1395f7b27.tar.gz
rust-38af7b068f506019a3aaa7c107e22bc1395f7b27.zip
ctfe: make CompileTimeInterpCx type alias public
-rw-r--r--compiler/rustc_const_eval/src/const_eval/machine.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs
index a075bdc1911..c3d94ca0e59 100644
--- a/compiler/rustc_const_eval/src/const_eval/machine.rs
+++ b/compiler/rustc_const_eval/src/const_eval/machine.rs
@@ -40,7 +40,10 @@ const TINY_LINT_TERMINATOR_LIMIT: usize = 20;
 /// power of two of interpreted terminators.
 const PROGRESS_INDICATOR_START: usize = 4_000_000;
 
-/// Extra machine state for CTFE, and the Machine instance
+/// Extra machine state for CTFE, and the Machine instance.
+//
+// Should be public because out-of-tree rustc consumers need this
+// if they want to interact with constant values.
 pub struct CompileTimeMachine<'tcx> {
     /// The number of terminators that have been evaluated.
     ///
@@ -160,7 +163,7 @@ impl<K: Hash + Eq, V> interpret::AllocMap<K, V> for FxIndexMap<K, V> {
     }
 }
 
-pub(crate) type CompileTimeInterpCx<'tcx> = InterpCx<'tcx, CompileTimeMachine<'tcx>>;
+pub type CompileTimeInterpCx<'tcx> = InterpCx<'tcx, CompileTimeMachine<'tcx>>;
 
 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
 pub enum MemoryKind {