Add codegen test(s) for -Zbuild-std-features=panic_immediate_abort #118393
Labels
-Zbuild-std
Unstable Cargo option: Compile the standard library yourself.
A-panic
Area: Panicking machinery
A-testsuite
Area: The testsuite used to check the correctness of rustc
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The standard library has a feature
panic_immediate_abort
which is for use with-Zbuild-std
to eliminate all the panic formatting code. As a result, we have a lot of checks for that feature across the library code, to remove#[inline(never)]
when that feature is enabled, so that panic helpers can be inlined and optimized away.There are no tests for whether this actually works. I know it mostly works, because I just checked manually. What I did was something like this:
What comes out is this:
That looks acceptable to me.
Someone should use this general procedure to build a test.
-Zbuild-std-features
Vec::insert
andVec::remove
, the ones forRefCell
, maybe others?)-Zbuild-std-features=panic_immediate_abort
and check that all those symbols are goneThe text was updated successfully, but these errors were encountered: