-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
disallow repr()
on invalid items
#133925
base: master
Are you sure you want to change the base?
disallow repr()
on invalid items
#133925
Conversation
Also this generates an error when `repr` is used on a trait method and the `fn_align` feature is not enabled. Looks like that was missed here: https://github.com/rust-lang/rust/pull/110313/files Which first enables the align attribute on trait methods.
@bors try |
Nominating as a courtesy for T-lang, should be a trivial decision since this was likely never intended |
…<try> disallow `repr()` on invalid items fixes rust-lang#129606 Disallows `repr()` (so a repr with no arguments) on items where that won't ever make sense. Also this generates an error when `repr` is used on a trait method and the `fn_align` feature is not enabled. Looks like that was missed here: https://github.com/rust-lang/rust/pull/110313/files Which first accepts the align attribute on trait methods. r? `@compiler-errors`
This comment has been minimized.
This comment has been minimized.
Oh nice! If this fixes an issue you have right now, great! Especially the tests are nice so I can't mess it up again, but the code in |
well this change unintentionally turns out to fix that ICE. And yeah the test coverage is the most important part, I'm not at all attached to this code. Good luck with your rebase! |
lol thanks, can't be much worse than the current one (I'm 4 days in) |
r=me when T-lang comes back w/ a decision @rustbot team |
fixes #129606
fixes #132391
Disallows
repr()
(so a repr with no arguments) on items where that won't ever make sense.Also this generates an error when
repr
is used on a trait method and thefn_align
feature is not enabled. Looks like that was missed here:https://github.com/rust-lang/rust/pull/110313/files
Which first accepts the align attribute on trait methods.
r? @compiler-errors
cc @jdonszelmann who claimed #132391 and generally has been working on attributes