Uh oh!
There was an error while loading. Please reload this page.
allow repr(align = x) on inherent methods - #110313
Conversation
rustbot
commented
Apr 14, 2023
(rustbot has picked a reviewer for you, use r? to override) |
| #[no_mangle] | ||
| #[repr(align(16))] | ||
| pub fn method_align(self) {} | ||
| } |
There was a problem hiding this comment.
Can you also add a check for trait methods and associated functions, just to be sure? i.e.
| } | |
| // CHECK: align 16 | |
| #[no_mangle] | |
| #[repr(align(16))] | |
| pubfnassociated_fn(){} | |
| } | |
| traitT{ | |
| fntrait_fn(){} | |
| fntrait_method(self){} | |
| } | |
| implTforA{ | |
| // CHECK: align 16 | |
| #[no_mangle] | |
| #[repr(align(16))] | |
| fntrait_fn(){} | |
| // CHECK: align 16 | |
| #[no_mangle] | |
| #[repr(align(16))] | |
| fntrait_method(self){} | |
| } |
There was a problem hiding this comment.
Should those be allowed? The current change doesn't allow those, but I can change it to include trait impls as well.
There was a problem hiding this comment.
I think yes, they should? Don't really see a reason to not allow these (btw maybe a test for default bodies should be added too, although I'm not sure if it's easy to do...).
WaffleLapkin
commented
Apr 14, 2023
WaffleLapkin
commented
Apr 17, 2023
Do we not have a test which shows the @bors r+ rollup |
bors
commented
Apr 17, 2023
fee1-dead
commented
Apr 17, 2023
@WaffleLapkin done. |
WaffleLapkin
commented
Apr 17, 2023
@bors r+ |
bors
commented
Apr 17, 2023
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#104055 (Migrate diagnostics in `rustc_borrowck`) - rust-lang#110257 (fix false positives for `unused_parens` around unary and binary operations) - rust-lang#110313 (allow `repr(align = x)` on inherent methods) - rust-lang#110337 (Correct default value for default-linker-libraries) - rust-lang#110386 (Clean up traversal macros) - rust-lang#110394 (Various minor Idx-related tweaks) - rust-lang#110425 (Encode def span for `ConstParam`) - rust-lang#110434 (Check freeze with right param-env in `deduced_param_attrs`) - rust-lang#110455 (tests: adapt for LLVM change 5b386b8) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Discussion: #82232 (comment)