You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: this method could have a `#[must_use]` attribute
--> crates/tracerr/src/trace.rs:50:5
|
50 | fn deref(&self) -> &Vec<Frame> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] fn deref(&self) -> &Vec<Frame>`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
Changing the order of the CLI arguments doesn't affect anything.
While disabling lint via !#[allow(clippy::must_use_candidate)] attribute in crate's root works OK, as expected.
I suggest that things listed in allow (no matter where) as a white list should take precedence over deny as a black list.
To check if this is a Clippy issue: What is the result of rustc -D unused -A dead_code main.rs?
Answer:
$ rustc -Dunused -Adead_code src/main.rs
error: function is never used: `foo`
--> src/main.rs:5:1
|
5 | fn foo() {}
| ^^^^^^^^
|
= note: `-D dead-code` implied by `-D unused`
error: aborting due to previous error
So yeah this has to be addressed in rustc, not in Clippy. I keep this issue open, because, this behavior would also be nice to have from the Clippy perspective.
I have a weird issue, where I cannot disable a single lint via command line.
Running the following
still results in lint being applied:
Changing the order of the CLI arguments doesn't affect anything.
While disabling lint via
!#[allow(clippy::must_use_candidate)]
attribute in crate's root works OK, as expected.I suggest that things listed in
allow
(no matter where) as a white list should take precedence overdeny
as a black list.The text was updated successfully, but these errors were encountered: