From 33f854b4a884269ad36c468b98e9ddf2763bfafc Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 2 Sep 2022 20:47:01 -0700 Subject: [PATCH] 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` --> 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 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c4a6e8..b16af6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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