Skip to content

Commit aecc469

Browse files
authored
Merge pull request #4458 from rust-lang/rustup-2025-07-10
Automatic Rustup
2 parents ffa564d + d13bd5a commit aecc469

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
688ea65df6a47866d0f72a00f1e18b47a7edf83b
1+
32cd9114712a24010b0583624dc52ac302194128

src/machine.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,6 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
10141014

10151015
const PANIC_ON_ALLOC_FAIL: bool = false;
10161016

1017-
const TRACING_ENABLED: bool = cfg!(feature = "tracing");
1018-
10191017
#[inline(always)]
10201018
fn enforce_alignment(ecx: &MiriInterpCx<'tcx>) -> bool {
10211019
ecx.machine.check_alignment != AlignmentCheck::None
@@ -1827,6 +1825,19 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
18271825
#[cfg(not(target_os = "linux"))]
18281826
MiriAllocParams::Global
18291827
}
1828+
1829+
fn enter_trace_span(span: impl FnOnce() -> tracing::Span) -> impl EnteredTraceSpan {
1830+
#[cfg(feature = "tracing")]
1831+
{
1832+
span().entered()
1833+
}
1834+
#[cfg(not(feature = "tracing"))]
1835+
#[expect(clippy::unused_unit)]
1836+
{
1837+
let _ = span; // so we avoid the "unused variable" warning
1838+
()
1839+
}
1840+
}
18301841
}
18311842

18321843
/// Trait for callbacks handling asynchronous machine operations.

0 commit comments

Comments
 (0)