-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Add long diagnostics for enum repr errors. #24975
Conversation
r? @Aatch (rust_highfive has picked a reviewer for you, use r? to override) |
Here's an example where the current error for E0079 is misleading. #[repr(u8)]
enum Wow {
X = "what",
Y
}
fn main() {}
Note the mention of signed integer constant. |
@michaelsproul I think In the short term, maybe you could work around it by changing the text to say "error code 0082" .. though I can see how that is not ideal. Nonetheless, I'm not 100% sure that referring users to another error code is really great practice... would it not be better to tell users to look up the |
@pnkfelix: You're absolutely right! I'll leave |
Explanations for E0079, E0080, E0081, E0082, E0083 and E0084 as part of #24407. All the errors concern the use of `#[repr(X)]` with enum types. I also updated the short description for E0079 so that it takes sign into account.
Explanations for E0079, E0080, E0081, E0082, E0083 and E0084 as part of #24407.
All the errors concern the use of
#[repr(X)]
with enum types.I also updated the short description for E0079 so that it takes sign into account.