]> git.lizzy.rs Git - rust.git/blob - tests/ui/let_underscore_lock.stderr
lint all guard types, not just lock functions
[rust.git] / tests / ui / let_underscore_lock.stderr
1 error: non-binding let on a synchronization lock
2   --> $DIR/let_underscore_lock.rs:7:5
3    |
4 LL |     let _ = m.lock();
5    |     ^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::let-underscore-lock` implied by `-D warnings`
8    = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
9
10 error: non-binding let on a synchronization lock
11   --> $DIR/let_underscore_lock.rs:8:5
12    |
13 LL |     let _ = rw.read();
14    |     ^^^^^^^^^^^^^^^^^^
15    |
16    = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
17
18 error: non-binding let on a synchronization lock
19   --> $DIR/let_underscore_lock.rs:9:5
20    |
21 LL |     let _ = rw.write();
22    |     ^^^^^^^^^^^^^^^^^^^
23    |
24    = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
25
26 error: non-binding let on a synchronization lock
27   --> $DIR/let_underscore_lock.rs:10:5
28    |
29 LL |     let _ = m.try_lock();
30    |     ^^^^^^^^^^^^^^^^^^^^^
31    |
32    = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
33
34 error: non-binding let on a synchronization lock
35   --> $DIR/let_underscore_lock.rs:11:5
36    |
37 LL |     let _ = rw.try_read();
38    |     ^^^^^^^^^^^^^^^^^^^^^^
39    |
40    = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
41
42 error: non-binding let on a synchronization lock
43   --> $DIR/let_underscore_lock.rs:12:5
44    |
45 LL |     let _ = rw.try_write();
46    |     ^^^^^^^^^^^^^^^^^^^^^^^
47    |
48    = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
49
50 error: aborting due to 6 previous errors
51