-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
inherit #[align] from trait method prototypes
#143156
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
|
Maybe add a few tests for multiple |
923f7fc to
3bc59cd
Compare
@folkertdev I can't promise this won't somehow flow back into concerns for the implementation of the feature we're stabilizing in that PR, but I agree this should be enough for here. |
|
In particular, "there is one universal rule for how this trait's code should be aligned" reduces the number of things we need to worry about when trying to correctly instantiate the alignment of that code's functions. |
|
Sure, we'll see how that develops. At least we've thought about this now, and have something concrete to create tests against if the need arises. |
|
|
|
Some changes occurred in compiler/rustc_codegen_ssa Some changes occurred in compiler/rustc_codegen_ssa/src/codegen_attrs.rs |
3bc59cd to
bcf5105
Compare
|
@bors r+ |
@workingjubilee this seems straightforward enough. Now that we're planning to make
-Cmin-function-alignmenta target modifier, I don't think there are any cross-crate complications here?@Jules-Bertholet is this the behavior you had in mind? In particular the inheritance of the attribute of a default impl is maybe a bit unintuitive at first? (but I think it's ok if that behavior is explicitly documented).
r? ghost