-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
ICE: malformed malformed repr(align(N))
#132391
Comments
malformed repr(align(N))
Without performing an exact bisection, I think this is #131633. |
Actually, #131633 simply exposed a pre-existing bug: this doesn't even error on stable or beta, lmao. Actually there's like at least 2 separate bugs here:
|
cargo bisect-rustc does pin it down to that: |
Yes, #131633, because we should've emitted an error already by that point but didn't. |
...I guess this is technically a regression? |
The previous behavior is also unintentionally accepted code, I think. |
This is actually a deficiency in how attributes are currently handled, pending a work cf. rust-lang/compiler-team#796. This should not be spot-fixed, how this is even handled in the first place needs to be fixed (allow-list rather than deny-list), and preferably don't mix AST with HIR. |
expecting this to be resolved either by #131808 or a followup |
@rustbot claim |
Marking as P-low because it's accepting code that we shouldn't be accepting, the ICE is just "don't write malformed code" but yeah. |
woo i uncovered a bug! i knew attribute handling was weird, but i'm shocked that it's possible to hit this code path without trying to parse the repr attribute anywhere else that would error. |
@rustbot label +A-repr +A-align |
(due diligence, cc #132693 (comment)) |
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: