Skip to content

Commit 7c5b188

Browse files
committed
Bless all let_underscore tests
1 parent 398f946 commit 7c5b188

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

clippy_lints/foo.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello

tests/ui/let_underscore_lock.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: non-binding let on a synchronization lock
1+
error: non-binding `let` on a synchronization lock
22
--> $DIR/let_underscore_lock.rs:9:5
33
|
44
LL | let _ = p_m.lock();
@@ -7,23 +7,23 @@ LL | let _ = p_m.lock();
77
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
88
= note: `-D clippy::let-underscore-lock` implied by `-D warnings`
99

10-
error: non-binding let on a synchronization lock
10+
error: non-binding `let` on a synchronization lock
1111
--> $DIR/let_underscore_lock.rs:12:5
1212
|
1313
LL | let _ = p_m1.lock();
1414
| ^^^^^^^^^^^^^^^^^^^^
1515
|
1616
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
1717

18-
error: non-binding let on a synchronization lock
18+
error: non-binding `let` on a synchronization lock
1919
--> $DIR/let_underscore_lock.rs:15:5
2020
|
2121
LL | let _ = p_rw.read();
2222
| ^^^^^^^^^^^^^^^^^^^^
2323
|
2424
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
2525

26-
error: non-binding let on a synchronization lock
26+
error: non-binding `let` on a synchronization lock
2727
--> $DIR/let_underscore_lock.rs:16:5
2828
|
2929
LL | let _ = p_rw.write();

tests/ui/let_underscore_must_use.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: non-binding let on a result of a `#[must_use]` function
1+
error: non-binding `let` on a result of a `#[must_use]` function
22
--> $DIR/let_underscore_must_use.rs:67:5
33
|
44
LL | let _ = f();
@@ -7,87 +7,87 @@ LL | let _ = f();
77
= help: consider explicitly using function result
88
= note: `-D clippy::let-underscore-must-use` implied by `-D warnings`
99

10-
error: non-binding let on an expression with `#[must_use]` type
10+
error: non-binding `let` on an expression with `#[must_use]` type
1111
--> $DIR/let_underscore_must_use.rs:68:5
1212
|
1313
LL | let _ = g();
1414
| ^^^^^^^^^^^^
1515
|
1616
= help: consider explicitly using expression value
1717

18-
error: non-binding let on a result of a `#[must_use]` function
18+
error: non-binding `let` on a result of a `#[must_use]` function
1919
--> $DIR/let_underscore_must_use.rs:70:5
2020
|
2121
LL | let _ = l(0_u32);
2222
| ^^^^^^^^^^^^^^^^^
2323
|
2424
= help: consider explicitly using function result
2525

26-
error: non-binding let on a result of a `#[must_use]` function
26+
error: non-binding `let` on a result of a `#[must_use]` function
2727
--> $DIR/let_underscore_must_use.rs:74:5
2828
|
2929
LL | let _ = s.f();
3030
| ^^^^^^^^^^^^^^
3131
|
3232
= help: consider explicitly using function result
3333

34-
error: non-binding let on an expression with `#[must_use]` type
34+
error: non-binding `let` on an expression with `#[must_use]` type
3535
--> $DIR/let_underscore_must_use.rs:75:5
3636
|
3737
LL | let _ = s.g();
3838
| ^^^^^^^^^^^^^^
3939
|
4040
= help: consider explicitly using expression value
4141

42-
error: non-binding let on a result of a `#[must_use]` function
42+
error: non-binding `let` on a result of a `#[must_use]` function
4343
--> $DIR/let_underscore_must_use.rs:78:5
4444
|
4545
LL | let _ = S::h();
4646
| ^^^^^^^^^^^^^^^
4747
|
4848
= help: consider explicitly using function result
4949

50-
error: non-binding let on an expression with `#[must_use]` type
50+
error: non-binding `let` on an expression with `#[must_use]` type
5151
--> $DIR/let_underscore_must_use.rs:79:5
5252
|
5353
LL | let _ = S::p();
5454
| ^^^^^^^^^^^^^^^
5555
|
5656
= help: consider explicitly using expression value
5757

58-
error: non-binding let on a result of a `#[must_use]` function
58+
error: non-binding `let` on a result of a `#[must_use]` function
5959
--> $DIR/let_underscore_must_use.rs:81:5
6060
|
6161
LL | let _ = S::a();
6262
| ^^^^^^^^^^^^^^^
6363
|
6464
= help: consider explicitly using function result
6565

66-
error: non-binding let on an expression with `#[must_use]` type
66+
error: non-binding `let` on an expression with `#[must_use]` type
6767
--> $DIR/let_underscore_must_use.rs:83:5
6868
|
6969
LL | let _ = if true { Ok(()) } else { Err(()) };
7070
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7171
|
7272
= help: consider explicitly using expression value
7373

74-
error: non-binding let on a result of a `#[must_use]` function
74+
error: non-binding `let` on a result of a `#[must_use]` function
7575
--> $DIR/let_underscore_must_use.rs:87:5
7676
|
7777
LL | let _ = a.is_ok();
7878
| ^^^^^^^^^^^^^^^^^^
7979
|
8080
= help: consider explicitly using function result
8181

82-
error: non-binding let on an expression with `#[must_use]` type
82+
error: non-binding `let` on an expression with `#[must_use]` type
8383
--> $DIR/let_underscore_must_use.rs:89:5
8484
|
8585
LL | let _ = a.map(|_| ());
8686
| ^^^^^^^^^^^^^^^^^^^^^^
8787
|
8888
= help: consider explicitly using expression value
8989

90-
error: non-binding let on an expression with `#[must_use]` type
90+
error: non-binding `let` on an expression with `#[must_use]` type
9191
--> $DIR/let_underscore_must_use.rs:91:5
9292
|
9393
LL | let _ = a;

0 commit comments

Comments
 (0)