-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Don't ICE on misused #[rustc_layout_scalar_range_start(..)]
when #![feature(rustc_attrs)]
isn't even enabled
#147767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…` step By default, all `//@ build-fail` UI tests must first succeed in `check-pass` mode, because build-fail normally only makes sense for tests that would check successfully. However, in some cases a full build will fail in a different way, e.g. due to an ICE that is not present in check builds. For those tests, it's useful to be able to opt out of the check-pass step.
Some changes occurred in src/tools/compiletest cc @jieyouxu The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes. |
r? @davidtwco rustbot has assigned @davidtwco. Use |
The |
I suppose another possible implementation would be to have the attribute parser bail immediately as soon as it sees a |
Putting this on hold while I look into making the @rustbot author |
Reminder, once the PR becomes ready for a review, use |
The job Click to see the possible cause of the failure (guessed by this bot)
|
Why not just make the |
Yeah, that’s more or less what I realised after submitting this. As soon as we see an internal attribute without the feature enabled, we should stop compilation immediately. Then panicking in later code doesn’t matter, because it can only happen if the feature is on. |
I’ll close this PR, and open a new one when I figure out where to put the fatal error. |
Fixes #147761.
Fixing this is of somewhat marginal benefit, since users shouldn't be poking around with internal attribute anyway.
But an ICE on stable is still an ICE, and the fix is simple enough, so I think it's worth doing this to reduce future bug reports like #147756.
(Note that because
#![feature(rustc_attrs)]
is not enabled, the logic for suppressing “please report an ICE” is not activated, so the compiler actually does ask the user to send a bug report.)