Skip to content

Commit 22861e9

Browse files
authored
Unrolled build for rust-lang#129309
Rollup merge of rust-lang#129309 - RalfJung:CompileTimeInterpCx, r=compiler-errors ctfe: make CompileTimeInterpCx type alias public `CompileTimeMachine` is already public so there is no good reason to not also make this public. Also add comment explaining why `CompileTimeMachine` is public.
2 parents 5aea140 + 38af7b0 commit 22861e9

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)