diff options
| author | Stypox <stypox@pm.me> | 2025-05-12 16:40:46 +0200 |
|---|---|---|
| committer | Stypox <stypox@pm.me> | 2025-05-13 18:15:02 +0200 |
| commit | f4bc4cd1fdb39203740929a6ec2cfc42f8b1e86d (patch) | |
| tree | 814d720a6a720668ae5962fed0833608bbbbda4e /compiler/rustc_const_eval/src | |
| parent | 4eca99a18eab3d4e28ed1ce3ee620d442955a470 (diff) | |
| download | rust-f4bc4cd1fdb39203740929a6ec2cfc42f8b1e86d.tar.gz rust-f4bc4cd1fdb39203740929a6ec2cfc42f8b1e86d.zip | |
Add TRACING_ENABLED to Machine trait
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/machine.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/machine.rs b/compiler/rustc_const_eval/src/interpret/machine.rs index a1386b4e1be..d13e17a481a 100644 --- a/compiler/rustc_const_eval/src/interpret/machine.rs +++ b/compiler/rustc_const_eval/src/interpret/machine.rs @@ -147,6 +147,12 @@ pub trait Machine<'tcx>: Sized { /// already been checked before. const ALL_CONSTS_ARE_PRECHECKED: bool = true; + /// Determines whether rustc_const_eval functions that make use of the [Machine] should make + /// tracing calls (to the `tracing` library). By default this is `false`, meaning the tracing + /// calls will supposedly be optimized out. This flag is set to `true` inside Miri, to allow + /// tracing the interpretation steps, among other things. + const TRACING_ENABLED: bool = false; + /// Whether memory accesses should be alignment-checked. fn enforce_alignment(ecx: &InterpCx<'tcx, Self>) -> bool; |
