Bless all let_underscore tests

This commit is contained in:
Steven Casper 2022-11-04 21:21:55 -07:00
parent 398f9468df
commit 7c5b1887c2
3 changed files with 17 additions and 16 deletions

1
clippy_lints/foo.txt Normal file
View File

@ -0,0 +1 @@
Hello

View File

@ -1,4 +1,4 @@
error: non-binding let on a synchronization lock error: non-binding `let` on a synchronization lock
--> $DIR/let_underscore_lock.rs:9:5 --> $DIR/let_underscore_lock.rs:9:5
| |
LL | let _ = p_m.lock(); LL | let _ = p_m.lock();
@ -7,7 +7,7 @@ LL | let _ = p_m.lock();
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop` = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
= note: `-D clippy::let-underscore-lock` implied by `-D warnings` = note: `-D clippy::let-underscore-lock` implied by `-D warnings`
error: non-binding let on a synchronization lock error: non-binding `let` on a synchronization lock
--> $DIR/let_underscore_lock.rs:12:5 --> $DIR/let_underscore_lock.rs:12:5
| |
LL | let _ = p_m1.lock(); LL | let _ = p_m1.lock();
@ -15,7 +15,7 @@ LL | let _ = p_m1.lock();
| |
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop` = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
error: non-binding let on a synchronization lock error: non-binding `let` on a synchronization lock
--> $DIR/let_underscore_lock.rs:15:5 --> $DIR/let_underscore_lock.rs:15:5
| |
LL | let _ = p_rw.read(); LL | let _ = p_rw.read();
@ -23,7 +23,7 @@ LL | let _ = p_rw.read();
| |
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop` = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
error: non-binding let on a synchronization lock error: non-binding `let` on a synchronization lock
--> $DIR/let_underscore_lock.rs:16:5 --> $DIR/let_underscore_lock.rs:16:5
| |
LL | let _ = p_rw.write(); LL | let _ = p_rw.write();

View File

@ -1,4 +1,4 @@
error: non-binding let on a result of a `#[must_use]` function error: non-binding `let` on a result of a `#[must_use]` function
--> $DIR/let_underscore_must_use.rs:67:5 --> $DIR/let_underscore_must_use.rs:67:5
| |
LL | let _ = f(); LL | let _ = f();
@ -7,7 +7,7 @@ LL | let _ = f();
= help: consider explicitly using function result = help: consider explicitly using function result
= note: `-D clippy::let-underscore-must-use` implied by `-D warnings` = note: `-D clippy::let-underscore-must-use` implied by `-D warnings`
error: non-binding let on an expression with `#[must_use]` type error: non-binding `let` on an expression with `#[must_use]` type
--> $DIR/let_underscore_must_use.rs:68:5 --> $DIR/let_underscore_must_use.rs:68:5
| |
LL | let _ = g(); LL | let _ = g();
@ -15,7 +15,7 @@ LL | let _ = g();
| |
= help: consider explicitly using expression value = help: consider explicitly using expression value
error: non-binding let on a result of a `#[must_use]` function error: non-binding `let` on a result of a `#[must_use]` function
--> $DIR/let_underscore_must_use.rs:70:5 --> $DIR/let_underscore_must_use.rs:70:5
| |
LL | let _ = l(0_u32); LL | let _ = l(0_u32);
@ -23,7 +23,7 @@ LL | let _ = l(0_u32);
| |
= help: consider explicitly using function result = help: consider explicitly using function result
error: non-binding let on a result of a `#[must_use]` function error: non-binding `let` on a result of a `#[must_use]` function
--> $DIR/let_underscore_must_use.rs:74:5 --> $DIR/let_underscore_must_use.rs:74:5
| |
LL | let _ = s.f(); LL | let _ = s.f();
@ -31,7 +31,7 @@ LL | let _ = s.f();
| |
= help: consider explicitly using function result = help: consider explicitly using function result
error: non-binding let on an expression with `#[must_use]` type error: non-binding `let` on an expression with `#[must_use]` type
--> $DIR/let_underscore_must_use.rs:75:5 --> $DIR/let_underscore_must_use.rs:75:5
| |
LL | let _ = s.g(); LL | let _ = s.g();
@ -39,7 +39,7 @@ LL | let _ = s.g();
| |
= help: consider explicitly using expression value = help: consider explicitly using expression value
error: non-binding let on a result of a `#[must_use]` function error: non-binding `let` on a result of a `#[must_use]` function
--> $DIR/let_underscore_must_use.rs:78:5 --> $DIR/let_underscore_must_use.rs:78:5
| |
LL | let _ = S::h(); LL | let _ = S::h();
@ -47,7 +47,7 @@ LL | let _ = S::h();
| |
= help: consider explicitly using function result = help: consider explicitly using function result
error: non-binding let on an expression with `#[must_use]` type error: non-binding `let` on an expression with `#[must_use]` type
--> $DIR/let_underscore_must_use.rs:79:5 --> $DIR/let_underscore_must_use.rs:79:5
| |
LL | let _ = S::p(); LL | let _ = S::p();
@ -55,7 +55,7 @@ LL | let _ = S::p();
| |
= help: consider explicitly using expression value = help: consider explicitly using expression value
error: non-binding let on a result of a `#[must_use]` function error: non-binding `let` on a result of a `#[must_use]` function
--> $DIR/let_underscore_must_use.rs:81:5 --> $DIR/let_underscore_must_use.rs:81:5
| |
LL | let _ = S::a(); LL | let _ = S::a();
@ -63,7 +63,7 @@ LL | let _ = S::a();
| |
= help: consider explicitly using function result = help: consider explicitly using function result
error: non-binding let on an expression with `#[must_use]` type error: non-binding `let` on an expression with `#[must_use]` type
--> $DIR/let_underscore_must_use.rs:83:5 --> $DIR/let_underscore_must_use.rs:83:5
| |
LL | let _ = if true { Ok(()) } else { Err(()) }; LL | let _ = if true { Ok(()) } else { Err(()) };
@ -71,7 +71,7 @@ LL | let _ = if true { Ok(()) } else { Err(()) };
| |
= help: consider explicitly using expression value = help: consider explicitly using expression value
error: non-binding let on a result of a `#[must_use]` function error: non-binding `let` on a result of a `#[must_use]` function
--> $DIR/let_underscore_must_use.rs:87:5 --> $DIR/let_underscore_must_use.rs:87:5
| |
LL | let _ = a.is_ok(); LL | let _ = a.is_ok();
@ -79,7 +79,7 @@ LL | let _ = a.is_ok();
| |
= help: consider explicitly using function result = help: consider explicitly using function result
error: non-binding let on an expression with `#[must_use]` type error: non-binding `let` on an expression with `#[must_use]` type
--> $DIR/let_underscore_must_use.rs:89:5 --> $DIR/let_underscore_must_use.rs:89:5
| |
LL | let _ = a.map(|_| ()); LL | let _ = a.map(|_| ());
@ -87,7 +87,7 @@ LL | let _ = a.map(|_| ());
| |
= help: consider explicitly using expression value = help: consider explicitly using expression value
error: non-binding let on an expression with `#[must_use]` type error: non-binding `let` on an expression with `#[must_use]` type
--> $DIR/let_underscore_must_use.rs:91:5 --> $DIR/let_underscore_must_use.rs:91:5
| |
LL | let _ = a; LL | let _ = a;