]> git.lizzy.rs Git - rust.git/blob - tests/ui/if_let_mutex.stderr
add note about update-all-refs script, revert redundant pat to master
[rust.git] / tests / ui / if_let_mutex.stderr
1 error: calling `Mutex::lock` inside the scope of another `Mutex::lock` causes a deadlock
2   --> $DIR/if_let_mutex.rs:9:5
3    |
4 LL | /     if let Err(locked) = m.lock() {
5 LL | |         do_stuff(locked);
6 LL | |     } else {
7 LL | |         let lock = m.lock().unwrap();
8 LL | |         do_stuff(lock);
9 LL | |     };
10    | |_____^
11    |
12    = note: `-D clippy::if-let-mutex` implied by `-D warnings`
13    = help: move the lock call outside of the `if let ...` expression
14
15 error: aborting due to previous error
16