]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/await_holding_lock.stderr
Merge commit 'e329249b6a3a98830d860c74c8234a8dd9407436' into clippyup
[rust.git] / src / tools / clippy / tests / ui / await_holding_lock.stderr
index ddfb104cdfbd07ab1207f133e075182b3d409d0e..976da8d924247897317bed03461c579077a855cd 100644 (file)
-error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await
-  --> $DIR/await_holding_lock.rs:6:9
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:9:13
    |
-LL |     let guard = x.lock().unwrap();
-   |         ^^^^^
+LL |         let guard = x.lock().unwrap();
+   |             ^^^^^
    |
    = note: `-D clippy::await-holding-lock` implied by `-D warnings`
-note: these are all the await points this lock is held through
-  --> $DIR/await_holding_lock.rs:6:5
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:9:9
    |
-LL | /     let guard = x.lock().unwrap();
-LL | |     baz().await
-LL | | }
-   | |_^
+LL | /         let guard = x.lock().unwrap();
+LL | |         baz().await
+LL | |     }
+   | |_____^
 
-error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await
-  --> $DIR/await_holding_lock.rs:27:9
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:24:13
    |
-LL |     let guard = x.lock().unwrap();
-   |         ^^^^^
+LL |         let guard = x.read().unwrap();
+   |             ^^^^^
    |
-note: these are all the await points this lock is held through
-  --> $DIR/await_holding_lock.rs:27:5
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:24:9
    |
-LL | /     let guard = x.lock().unwrap();
+LL | /         let guard = x.read().unwrap();
+LL | |         baz().await
+LL | |     }
+   | |_____^
+
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:29:13
+   |
+LL |         let mut guard = x.write().unwrap();
+   |             ^^^^^^^^^
+   |
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:29:9
+   |
+LL | /         let mut guard = x.write().unwrap();
+LL | |         baz().await
+LL | |     }
+   | |_____^
+
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:50:13
+   |
+LL |         let guard = x.lock().unwrap();
+   |             ^^^^^
+   |
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:50:9
+   |
+LL | /         let guard = x.lock().unwrap();
 LL | |
-LL | |     let second = baz().await;
+LL | |         let second = baz().await;
 LL | |
 ...  |
-LL | |     first + second + third
-LL | | }
-   | |_^
+LL | |         first + second + third
+LL | |     }
+   | |_____^
 
-error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await
-  --> $DIR/await_holding_lock.rs:40:13
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:63:17
    |
-LL |         let guard = x.lock().unwrap();
+LL |             let guard = x.lock().unwrap();
+   |                 ^^^^^
+   |
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:63:13
+   |
+LL | /             let guard = x.lock().unwrap();
+LL | |             baz().await
+LL | |         };
+   | |_________^
+
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:75:17
+   |
+LL |             let guard = x.lock().unwrap();
+   |                 ^^^^^
+   |
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:75:13
+   |
+LL | /             let guard = x.lock().unwrap();
+LL | |             baz().await
+LL | |         }
+   | |_________^
+
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:87:13
+   |
+LL |         let guard = x.lock();
    |             ^^^^^
    |
-note: these are all the await points this lock is held through
-  --> $DIR/await_holding_lock.rs:40:9
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:87:9
    |
-LL | /         let guard = x.lock().unwrap();
+LL | /         let guard = x.lock();
 LL | |         baz().await
-LL | |     };
+LL | |     }
    | |_____^
 
-error: this MutexGuard is held across an 'await' point. Consider using an async-aware Mutex type or ensuring the MutexGuard is dropped before calling await
-  --> $DIR/await_holding_lock.rs:52:13
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:102:13
    |
-LL |         let guard = x.lock().unwrap();
+LL |         let guard = x.read();
    |             ^^^^^
    |
-note: these are all the await points this lock is held through
-  --> $DIR/await_holding_lock.rs:52:9
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:102:9
    |
-LL | /         let guard = x.lock().unwrap();
+LL | /         let guard = x.read();
 LL | |         baz().await
 LL | |     }
    | |_____^
 
-error: aborting due to 4 previous errors
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:107:13
+   |
+LL |         let mut guard = x.write();
+   |             ^^^^^^^^^
+   |
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:107:9
+   |
+LL | /         let mut guard = x.write();
+LL | |         baz().await
+LL | |     }
+   | |_____^
+
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:128:13
+   |
+LL |         let guard = x.lock();
+   |             ^^^^^
+   |
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:128:9
+   |
+LL | /         let guard = x.lock();
+LL | |
+LL | |         let second = baz().await;
+LL | |
+...  |
+LL | |         first + second + third
+LL | |     }
+   | |_____^
+
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:141:17
+   |
+LL |             let guard = x.lock();
+   |                 ^^^^^
+   |
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:141:13
+   |
+LL | /             let guard = x.lock();
+LL | |             baz().await
+LL | |         };
+   | |_________^
+
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:153:17
+   |
+LL |             let guard = x.lock();
+   |                 ^^^^^
+   |
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:153:13
+   |
+LL | /             let guard = x.lock();
+LL | |             baz().await
+LL | |         }
+   | |_________^
+
+error: this `MutexGuard` is held across an `await` point
+  --> $DIR/await_holding_lock.rs:173:9
+   |
+LL |     let mut guard = x.lock().unwrap();
+   |         ^^^^^^^^^
+   |
+   = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
+note: these are all the `await` points this lock is held through
+  --> $DIR/await_holding_lock.rs:173:5
+   |
+LL | /     let mut guard = x.lock().unwrap();
+LL | |     *guard += 1;
+LL | |     drop(guard);
+LL | |     baz().await;
+LL | | }
+   | |_^
+
+error: aborting due to 13 previous errors