You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Debug assertions are turned off in alloctests #162469
Enabling debug assertions for the standard library tests would require recompiling the standard library with debug assertions enabled too as standard library tests must run with the exact same cargo configuration as the sysroot standard library was compiled with to prevent libcore getting duplicated (once from the sysroot through libtest and once as regular dependency of the crate that is being tested) and duplicate lang item errors getting emitted.
Hmm, that's unfortunate. I still think the current state isn't ideal. Do the assertions at least run in CI, or are they actually just fancy code comments?
Activity
bjorn3 commentedon Sep 8, 2026
Enabling debug assertions for the standard library tests would require recompiling the standard library with debug assertions enabled too as standard library tests must run with the exact same cargo configuration as the sysroot standard library was compiled with to prevent libcore getting duplicated (once from the sysroot through libtest and once as regular dependency of the crate that is being tested) and duplicate lang item errors getting emitted.
maxdexh commentedon Sep 8, 2026
Hmm, that's unfortunate. I still think the current state isn't ideal. Do the assertions at least run in CI, or are they actually just fancy code comments?
bjorn3 commentedon Sep 8, 2026
Maybe the -alt builders enable them for the standard library? At least for the compiler the -alt builders should enable debug assertions.
Kobzol commentedon Sep 8, 2026
We should be running all tests on test runners on CI with debug assertions enabled.
maxdexh commentedon Sep 8, 2026
By "we should", do you mean "I think we do this" or "we should do this"?
Kobzol commentedon Sep 8, 2026
Sorry for not being clear :)
rust/src/ci/run.sh
Line 151 in 93a81b4
maxdexh commentedon Sep 8, 2026
Good enough for me. Might lead to more confusion, but at least we don't have broken assertions anywhere :D