1
1
error: future cannot be sent between threads safely
2
- --> $DIR/future_not_send.rs:7:62
2
+ --> $DIR/future_not_send.rs:7:1
3
3
|
4
4
LL | async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
5
- | ^^^^ future returned by `private_future` is not `Send`
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ future returned by `private_future` is not `Send`
6
6
|
7
7
note: future is not `Send` as this value is used across an await
8
8
--> $DIR/future_not_send.rs:9:20
@@ -23,10 +23,10 @@ LL | async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
23
23
= help: to override `-D warnings` add `#[allow(clippy::future_not_send)]`
24
24
25
25
error: future cannot be sent between threads safely
26
- --> $DIR/future_not_send.rs:12:42
26
+ --> $DIR/future_not_send.rs:12:1
27
27
|
28
28
LL | pub async fn public_future(rc: Rc<[u8]>) {
29
- | ^ future returned by `public_future` is not `Send`
29
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ future returned by `public_future` is not `Send`
30
30
|
31
31
note: future is not `Send` as this value is used across an await
32
32
--> $DIR/future_not_send.rs:14:20
@@ -39,10 +39,10 @@ LL | async { true }.await;
39
39
= note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`
40
40
41
41
error: future cannot be sent between threads safely
42
- --> $DIR/future_not_send.rs:21:63
42
+ --> $DIR/future_not_send.rs:21:1
43
43
|
44
44
LL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
45
- | ^^^^ future returned by `private_future2` is not `Send`
45
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ future returned by `private_future2` is not `Send`
46
46
|
47
47
note: captured value is not `Send`
48
48
--> $DIR/future_not_send.rs:21:26
@@ -58,10 +58,10 @@ LL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
58
58
= note: `std::cell::Cell<usize>` doesn't implement `std::marker::Sync`
59
59
60
60
error: future cannot be sent between threads safely
61
- --> $DIR/future_not_send.rs:26:43
61
+ --> $DIR/future_not_send.rs:26:1
62
62
|
63
63
LL | pub async fn public_future2(rc: Rc<[u8]>) {}
64
- | ^ future returned by `public_future2` is not `Send`
64
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ future returned by `public_future2` is not `Send`
65
65
|
66
66
note: captured value is not `Send`
67
67
--> $DIR/future_not_send.rs:26:29
@@ -71,10 +71,10 @@ LL | pub async fn public_future2(rc: Rc<[u8]>) {}
71
71
= note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`
72
72
73
73
error: future cannot be sent between threads safely
74
- --> $DIR/future_not_send.rs:38:39
74
+ --> $DIR/future_not_send.rs:38:5
75
75
|
76
76
LL | async fn private_future(&self) -> usize {
77
- | ^^^^^ future returned by `private_future` is not `Send`
77
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ future returned by `private_future` is not `Send`
78
78
|
79
79
note: future is not `Send` as this value is used across an await
80
80
--> $DIR/future_not_send.rs:40:24
@@ -87,10 +87,10 @@ LL | async { true }.await;
87
87
= note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Sync`
88
88
89
89
error: future cannot be sent between threads safely
90
- --> $DIR/future_not_send.rs:44:39
90
+ --> $DIR/future_not_send.rs:44:5
91
91
|
92
92
LL | pub async fn public_future(&self) {
93
- | ^ future returned by `public_future` is not `Send`
93
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ future returned by `public_future` is not `Send`
94
94
|
95
95
note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
96
96
--> $DIR/future_not_send.rs:44:32
@@ -100,10 +100,13 @@ LL | pub async fn public_future(&self) {
100
100
= note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Sync`
101
101
102
102
error: future cannot be sent between threads safely
103
- --> $DIR/future_not_send.rs:55:37
103
+ --> $DIR/future_not_send.rs:55:1
104
104
|
105
- LL | async fn generic_future<T>(t: T) -> T
106
- | ^ future returned by `generic_future` is not `Send`
105
+ LL | / async fn generic_future<T>(t: T) -> T
106
+ LL | |
107
+ LL | | where
108
+ LL | | T: Send,
109
+ | |____________^ future returned by `generic_future` is not `Send`
107
110
|
108
111
note: future is not `Send` as this value is used across an await
109
112
--> $DIR/future_not_send.rs:61:20
@@ -115,10 +118,10 @@ LL | async { true }.await;
115
118
= note: `T` doesn't implement `std::marker::Sync`
116
119
117
120
error: future cannot be sent between threads safely
118
- --> $DIR/future_not_send.rs:73:34
121
+ --> $DIR/future_not_send.rs:73:1
119
122
|
120
123
LL | async fn unclear_future<T>(t: T) {}
121
- | ^ future returned by `unclear_future` is not `Send`
124
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ future returned by `unclear_future` is not `Send`
122
125
|
123
126
note: captured value is not `Send`
124
127
--> $DIR/future_not_send.rs:73:28
0 commit comments