mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-19 18:34:08 +00:00
Rollup merge of #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.
This commit is contained in:
commit
b1f19caa59
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user