-
Notifications
You must be signed in to change notification settings - Fork 14k
ptr_aligment_type: add more APIs #148764
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
base: main
Are you sure you want to change the base?
ptr_aligment_type: add more APIs #148764
Conversation
This comment has been minimized.
This comment has been minimized.
|
Conflicts with #148769, let's wait for that first |
|
I really prefer the current spelling of |
7310020 to
a16807e
Compare
library/core/src/alloc/layout.rs
Outdated
| // (However, we do not analogously require `align >= sizeof(void*)`, | ||
| // even though that is *also* a requirement of `posix_memalign`.) | ||
| align: Alignment, | ||
| alignment: Alignment, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rename is so big that github hides it by default.
Please make this PR just the api addition. If you also want to rename this field, that's fine, but please do it separately because of how much it touches.
| const fn is_size_alignment_valid(size: usize, alignment: Alignment) -> bool { | ||
| if size > Self::max_size_for_alignment(alignment) { | ||
| return false; | ||
| } | ||
| true | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix: you don't need the return, the true, or the false here.
This comment has been minimized.
This comment has been minimized.
a16807e to
47829f5
Compare
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
|
Looks like the failure is due to the rename of |
As per #102070 (comment)
Tracking issue: #102070
Mostly duplicating methods that previously worked with
usize-represented alignments.Naming follows a convention of
align: usize,alignment: Alignment.Based on top of #148769