<div dir="ltr"><p>Source: rust-tracing-core<br>Version: 0.1.36-1<br>Severity: normal<br>Tags: patch upstream<br><br></p><p>Dear rust-tracing-core maintainers,</p><p>Currently, rust-tracing-core assumes that Rust niche optimization[1] remains the<br>
same, even though Rust makes no such guarantee. As of Rust 1.97, this hardcoded<br>
assumption is no longer true, meaning that the metadata::tests::level_filter_reprs<br>
test will break[2]:</p>
<p>167s ---- metadata::tests::level_filter_reprs stdout ----<br>
167s<br>
167s thread 'metadata::tests::level_filter_reprs' (5315) panicked at src/metadata.rs:1119:13:<br>
167s assertion `left == right` failed: repr changed for LevelFilter::OFF<br>
167s left: 5<br>
167s right: 18446744073709551615<br>
167s stack backtrace:<br>
167s 0: __rustc::rust_begin_unwind<br>
167s at /usr/src/rustc-1.97.1/library/std/src/panicking.rs:689:5<br>
167s 1: core::panicking::panic_fmt<br>
167s at /usr/src/rustc-1.97.1/library/core/src/panicking.rs:80:14<br>
167s 2: core::panicking::assert_failed_inner<br>
167s at /usr/src/rustc-1.97.1/library/core/src/panicking.rs:434:23<br>
167s 3: core::panicking::assert_failed::<usize, usize><br>
167s at /usr/src/rustc-1.97.1/library/core/src/panicking.rs:394:5<br>
167s 4: tracing_core::metadata::tests::level_filter_reprs<br>
167s at ./src/metadata.rs:1119:13<br>
167s 5: tracing_core::metadata::tests::level_filter_reprs::{closure#0}<br>
167s at ./src/metadata.rs:1102:28<br>
167s 6: <tracing_core::metadata::tests::level_filter_reprs::{closure#0} as core::ops::function::FnOnce<()>>::call_once<br>
167s at /usr/src/rustc-1.97.1/library/core/src/ops/function.rs:250:5<br>
167s 7: <fn() -> core::result::Result<(), alloc::string::String> as core::ops::function::FnOnce<()>>::call_once<br>
167s at /usr/src/rustc-1.97.1/library/core/src/ops/function.rs:250:5<br>
167s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.</p><p>Naturally, this bug will not impact Debian until Rust is updated to 1.97. However, it is affecting Ubuntu and being tracked as LP: #2167368.</p><p>I have attached a patch which cherry-picks the upstream fix[3]. The fix makes it so the crate works with all Rust versions past the MSRV -- I successfully ran all tests with both 1.93.1 and 1.97.1, and I verified that the package builds against Debian unstable.</p><p>Please let me know if you need anything else.</p><p>Best wishes,</p><p>Max</p><p>[1]: <a rel="nofollow" href="https://www.0xatticus.com/posts/understanding_rust_niche/">https://www.0xatticus.com/posts/understanding_rust_niche/</a><br>
[2]: <a rel="nofollow" href="https://autopkgtest.ubuntu.com/results/autopkgtest-stonking/stonking/amd64/r/rust-tracing-core/20260912_123714_a8bc3@/log.gz">https://autopkgtest.ubuntu.com/results/autopkgtest-stonking/stonking/amd64/r/rust-tracing-core/20260912_123714_a8bc3@/log.gz</a></p><p>[3]: <a href="https://github.com/tokio-rs/tracing/pull/3537">https://github.com/tokio-rs/tracing/pull/3537</a></p></div>