Skip to content

Commit

Permalink
Command-line ignore let_underscore_drop clippy lint
Browse files Browse the repository at this point in the history
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 rust-lang/rust#97739 ?

    error: non-binding `let` on a type that implements `Drop`
     --> build.rs:8:5
      |
    8 |     let _ = fs::remove_dir_all(&out_dir);
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |
      = 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`
     --> build.rs:9:5
      |
    9 |     let _ = fs::create_dir(&out_dir);
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |
      = 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`
       --> src/lib.rs:128:5
        |
    128 |     let _ = fs::create_dir(&p);
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = 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
  • Loading branch information
dtolnay committed Sep 3, 2022
1 parent 065b58c commit 33f854b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@clippy
- run: cargo clippy -- -Dclippy::all -Dclippy::pedantic
- run: cargo clippy -- -Dclippy::all -Dclippy::pedantic -Aclippy::let_underscore_drop

outdated:
name: Outdated
Expand Down

0 comments on commit 33f854b

Please sign in to comment.