Hoy,
awesome crate, really ❤️
Since the release of 2.0.1 this morning, I'm getting a clippy::must_use_candidate lint in my project. It's a lint from the pedantic set.
Steps to reproduce
Linting this code with the command cargo clippy -- -W clippy::pedantic:
use bitbybit::bitfield;
#[bitfield(u8)]
pub struct ErrorFlags {
#[bit(0, rw)]
field1: bool,
}
fn main() {}
I get the following error message:
warning: this method could have a `#[must_use]` attribute
--> src/main.rs:4:12
|
4 | pub struct ErrorFlags {
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#e
= note: `-W clippy::must-use-candidate` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::must_use_candidate)]`
help: add the attribute
|
4 | pub struct #[must_use]
| +++++++++++
I tested with 2.0.0 and 2.0.1, and I can confirm that it only occurs in 2.0.1
Workaround
My current workaround is to add a #![allow(clippy::must_use_candidate)] to the module.
Cheers!
Hoy,
awesome crate, really ❤️
Since the release of 2.0.1 this morning, I'm getting a
clippy::must_use_candidatelint in my project. It's a lint from thepedanticset.Steps to reproduce
Linting this code with the command
cargo clippy -- -W clippy::pedantic:I get the following error message:
I tested with
2.0.0and2.0.1, and I can confirm that it only occurs in2.0.1Workaround
My current workaround is to add a
#![allow(clippy::must_use_candidate)]to the module.Cheers!