-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Add codegen test(s) for -Zbuild-std-features=panic_immediate_abort #118393
Copy link
Copy link
Closed
Labels
-Zfixed-x18Unstable option: -Zfixed-x18Unstable option: -Zfixed-x18A-panicArea: Panicking machineryArea: Panicking machineryA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
-Zfixed-x18Unstable option: -Zfixed-x18Unstable option: -Zfixed-x18A-panicArea: Panicking machineryArea: Panicking machineryA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The standard library has a feature
panic_immediate_abortwhich is for use with-Zbuild-stdto 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-featuresVec::insertandVec::remove, the ones forRefCell, maybe others?)-Zbuild-std-features=panic_immediate_abortand check that all those symbols are gone