forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 484
Open
Labels
• libRelated to the `rust/` library.Related to the `rust/` library.
Description
The recently landed patch rust_binder: add additional alignment checks adds this helper to Rust Binder:
fn is_aligned(value: usize, to: usize) -> bool {
value % to == 0
}This is done because is_multiple_of is not available prior to Rust v1.87.0. However, I would like to replace it with is_multiple_of as a follow-up change.
This may be worked around using the same strategy as rust: enable slice_flatten feature and provide it through an extension trait.
Note that if this change is implemented after Rust for Linux bumps its Minimum Supported Rust version to 1.85.0, then this may instead be implemented by the same strategy as rust: enable raw_ref_op feature, as the is_multiple_of method was added as unstable in rustc v1.82.0.
Metadata
Metadata
Assignees
Labels
• libRelated to the `rust/` library.Related to the `rust/` library.