|
1 | 1 | error: future cannot be sent between threads safely
|
2 |
| - --> tests/ui/send-not-implemented.rs:8:26 |
| 2 | + --> tests/ui/send-not-implemented.rs:8:5 |
3 | 3 | |
|
4 |
| - 8 | async fn test(&self) { |
5 |
| - | __________________________^ |
6 |
| - 9 | | let mutex = Mutex::new(()); |
7 |
| -10 | | let _guard = mutex.lock().unwrap(); |
8 |
| -11 | | f().await; |
9 |
| -12 | | } |
10 |
| - | |_____^ future created by async block is not `Send` |
| 4 | + 8 | async fn test(&self) { |
| 5 | + | ^^^^^ future created by async block is not `Send` |
11 | 6 | |
|
12 |
| - = help: within `{async block@$DIR/tests/ui/send-not-implemented.rs:8:26: 12:6}`, the trait `Send` is not implemented for `std::sync::MutexGuard<'_, ()>` |
| 7 | + = help: within `{async block@$DIR/tests/ui/send-not-implemented.rs:8:5: 8:10}`, the trait `Send` is not implemented for `std::sync::MutexGuard<'_, ()>` |
13 | 8 | note: future is not `Send` as this value is used across an await
|
14 | 9 | --> tests/ui/send-not-implemented.rs:11:13
|
15 | 10 | |
|
16 | 11 | 10 | let _guard = mutex.lock().unwrap();
|
17 | 12 | | ------ has type `std::sync::MutexGuard<'_, ()>` which is not `Send`
|
18 | 13 | 11 | f().await;
|
19 | 14 | | ^^^^^ await occurs here, with `_guard` maybe used later
|
20 |
| - = note: required for the cast from `Pin<Box<{async block@$DIR/tests/ui/send-not-implemented.rs:8:26: 12:6}>>` to `Pin<Box<dyn Future<Output = ()> + Send>>` |
| 15 | + = note: required for the cast from `Pin<Box<{async block@$DIR/tests/ui/send-not-implemented.rs:8:5: 8:10}>>` to `Pin<Box<dyn Future<Output = ()> + Send>>` |
21 | 16 |
|
22 | 17 | error: future cannot be sent between threads safely
|
23 |
| - --> tests/ui/send-not-implemented.rs:14:38 |
| 18 | + --> tests/ui/send-not-implemented.rs:14:5 |
24 | 19 | |
|
25 |
| -14 | async fn test_ret(&self) -> bool { |
26 |
| - | ______________________________________^ |
27 |
| -15 | | let mutex = Mutex::new(()); |
28 |
| -16 | | let _guard = mutex.lock().unwrap(); |
29 |
| -17 | | f().await; |
30 |
| -18 | | true |
31 |
| -19 | | } |
32 |
| - | |_____^ future created by async block is not `Send` |
| 20 | +14 | async fn test_ret(&self) -> bool { |
| 21 | + | ^^^^^ future created by async block is not `Send` |
33 | 22 | |
|
34 |
| - = help: within `{async block@$DIR/tests/ui/send-not-implemented.rs:14:38: 19:6}`, the trait `Send` is not implemented for `std::sync::MutexGuard<'_, ()>` |
| 23 | + = help: within `{async block@$DIR/tests/ui/send-not-implemented.rs:14:5: 14:10}`, the trait `Send` is not implemented for `std::sync::MutexGuard<'_, ()>` |
35 | 24 | note: future is not `Send` as this value is used across an await
|
36 | 25 | --> tests/ui/send-not-implemented.rs:17:13
|
37 | 26 | |
|
38 | 27 | 16 | let _guard = mutex.lock().unwrap();
|
39 | 28 | | ------ has type `std::sync::MutexGuard<'_, ()>` which is not `Send`
|
40 | 29 | 17 | f().await;
|
41 | 30 | | ^^^^^ await occurs here, with `_guard` maybe used later
|
42 |
| - = note: required for the cast from `Pin<Box<{async block@$DIR/tests/ui/send-not-implemented.rs:14:38: 19:6}>>` to `Pin<Box<dyn Future<Output = bool> + Send>>` |
| 31 | + = note: required for the cast from `Pin<Box<{async block@$DIR/tests/ui/send-not-implemented.rs:14:5: 14:10}>>` to `Pin<Box<dyn Future<Output = bool> + Send>>` |
0 commit comments