-
Notifications
You must be signed in to change notification settings - Fork 97
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
mmap_xen: Update to bitflags 2.4.0 #255
Conversation
I don't know if it's a real bug or not, but if you want to keep the previous values, you can switch to bitflags 2.* and you shouldn't see the warning anymore. |
Not for this PR, but I was looking at the code, and I'm a bit suspicious of:
Can a Unix memory have |
Unix can't have |
Oh I see, I was confused by the negative flag! |
Clippy gives this warning currently: error: &-masking with zero --> src/mmap_xen.rs:433:1 | 433 | / bitflags! { 434 | | /// Flags for the Xen mmap message. 435 | | pub struct MmapXenFlags: u32 { 436 | | /// Standard Unix memory mapping. ... | 446 | | } 447 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask = note: `#[deny(clippy::bad_bit_mask)]` on by default = note: this error originates in the macro `__impl_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info) Fix it by switching to a newer version of bitflags. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Clippy gives this warning currently:
error: &-masking with zero
--> src/mmap_xen.rs:433:1
|
433 | / bitflags! {
434 | | /// Flags for the Xen mmap message.
435 | | pub struct MmapXenFlags: u32 {
436 | | /// Standard Unix memory mapping.
... |
446 | | }
447 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask
= note:
#[deny(clippy::bad_bit_mask)]
on by default= note: this error originates in the macro
__impl_bitflags
which comes from the expansion of the macrobitflags
(in Nightly builds, run with -Z macro-backtrace for more info)Fix it.
Summary of the PR
Please summarize here why the changes in this PR are needed.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commitmessage has max 60 characters for the summary and max 75 characters for each
description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafe
code is properly documented.