Skip to content

Commit 38af7b0

Browse files
committed
ctfe: make CompileTimeInterpCx type alias public
1 parent e3f909b commit 38af7b0

File tree

1 file changed

+5
-2
lines changed
  • compiler/rustc_const_eval/src/const_eval

1 file changed

+5
-2
lines changed

compiler/rustc_const_eval/src/const_eval/machine.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ const TINY_LINT_TERMINATOR_LIMIT: usize = 20;
4040
/// power of two of interpreted terminators.
4141
const PROGRESS_INDICATOR_START: usize = 4_000_000;
4242

43-
/// Extra machine state for CTFE, and the Machine instance
43+
/// Extra machine state for CTFE, and the Machine instance.
44+
//
45+
// Should be public because out-of-tree rustc consumers need this
46+
// if they want to interact with constant values.
4447
pub struct CompileTimeMachine<'tcx> {
4548
/// The number of terminators that have been evaluated.
4649
///
@@ -160,7 +163,7 @@ impl<K: Hash + Eq, V> interpret::AllocMap<K, V> for FxIndexMap<K, V> {
160163
}
161164
}
162165

163-
pub(crate) type CompileTimeInterpCx<'tcx> = InterpCx<'tcx, CompileTimeMachine<'tcx>>;
166+
pub type CompileTimeInterpCx<'tcx> = InterpCx<'tcx, CompileTimeMachine<'tcx>>;
164167

165168
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
166169
pub enum MemoryKind {

0 commit comments

Comments
 (0)