Command-line ignore let_underscore_drop clippy lint

For whatever reason, the #![cfg_attr(feature = "cargo-clippy", allow(let_underscore_drop))]
attributes already in the code stopped working in the most recent nightly (2022-09-03).
Likely in connection with https://github.com/rust-lang/rust/pull/97739 ?

    error: non-binding `let` on a type that implements `Drop`
       --> serde/src/de/mod.rs:958:13
        |
    958 |             let _ = visitor;
        |             ^^^^^^^^^^^^^^^^
        |
        = note: `-D clippy::let-underscore-drop` implied by `-D clippy::pedantic`
        = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop

    error: non-binding `let` on a type that implements `Drop`
       --> serde/src/de/mod.rs:992:13
        |
    992 |             let _ = visitor;
        |             ^^^^^^^^^^^^^^^^
        |
        = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop

    error: non-binding `let` on a type that implements `Drop`
        --> serde/src/de/mod.rs:1616:9
         |
    1616 |         let _ = deserializer;
         |         ^^^^^^^^^^^^^^^^^^^^^
         |
         = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop

    error: non-binding `let` on a type that implements `Drop`
        --> serde/src/de/mod.rs:1640:9
         |
    1640 |         let _ = deserializer;
         |         ^^^^^^^^^^^^^^^^^^^^^
         |
         = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop

    error: non-binding `let` on a type that implements `Drop`
        --> serde/src/de/mod.rs:1651:9
         |
    1651 |         let _ = seq;
         |         ^^^^^^^^^^^^
         |
         = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop

    error: non-binding `let` on a type that implements `Drop`
        --> serde/src/de/mod.rs:1662:9
         |
    1662 |         let _ = map;
         |         ^^^^^^^^^^^^
         |
         = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop

    error: non-binding `let` on a type that implements `Drop`
        --> serde/src/de/mod.rs:1673:9
         |
    1673 |         let _ = data;
         |         ^^^^^^^^^^^^^
         |
         = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop

    error: non-binding `let` on a type that implements `Drop`
        --> serde/src/private/de.rs:1440:13
         |
    1440 |             let _ = visitor;
         |             ^^^^^^^^^^^^^^^^
         |
         = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop

    error: non-binding `let` on a type that implements `Drop`
        --> serde/src/private/de.rs:2163:13
         |
    2163 |             let _ = visitor;
         |             ^^^^^^^^^^^^^^^^
         |
         = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_drop
This commit is contained in:
David Tolnay 2022-09-02 20:50:24 -07:00
parent 5386897d24
commit d208762c81
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -167,11 +167,11 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@clippy - uses: dtolnay/rust-toolchain@clippy
- run: cd serde && cargo clippy --features rc,unstable -- -Dclippy::all -Dclippy::pedantic - run: cd serde && cargo clippy --features rc,unstable -- -Dclippy::all -Dclippy::pedantic -Aclippy::let_underscore_drop
- run: cd serde_derive && cargo clippy -- -Dclippy::all -Dclippy::pedantic - run: cd serde_derive && cargo clippy -- -Dclippy::all -Dclippy::pedantic
- run: cd serde_derive_internals && cargo clippy -- -Dclippy::all -Dclippy::pedantic - run: cd serde_derive_internals && cargo clippy -- -Dclippy::all -Dclippy::pedantic
- run: cd serde_test && cargo clippy -- -Dclippy::all -Dclippy::pedantic - run: cd serde_test && cargo clippy -- -Dclippy::all -Dclippy::pedantic -Aclippy::let_underscore_drop
- run: cd test_suite && cargo clippy --tests --features unstable -- -Dclippy::all -Dclippy::pedantic - run: cd test_suite && cargo clippy --tests --features unstable -- -Dclippy::all -Dclippy::pedantic -Aclippy::let_underscore_drop
- run: cd test_suite/no_std && cargo clippy -- -Dclippy::all -Dclippy::pedantic - run: cd test_suite/no_std && cargo clippy -- -Dclippy::all -Dclippy::pedantic
miri: miri: