11error: future cannot be sent between threads safely
2- --> $DIR/future_not_send.rs:7:62
2+ --> $DIR/future_not_send.rs:7:1
33 |
44LL | 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`
66 |
77note: future is not `Send` as this value is used across an await
88 --> $DIR/future_not_send.rs:9:20
@@ -23,10 +23,10 @@ LL | async fn private_future(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
2323 = help: to override `-D warnings` add `#[allow(clippy::future_not_send)]`
2424
2525error: future cannot be sent between threads safely
26- --> $DIR/future_not_send.rs:12:42
26+ --> $DIR/future_not_send.rs:12:1
2727 |
2828LL | 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`
3030 |
3131note: future is not `Send` as this value is used across an await
3232 --> $DIR/future_not_send.rs:14:20
@@ -39,10 +39,10 @@ LL | async { true }.await;
3939 = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`
4040
4141error: future cannot be sent between threads safely
42- --> $DIR/future_not_send.rs:21:63
42+ --> $DIR/future_not_send.rs:21:1
4343 |
4444LL | 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`
4646 |
4747note: captured value is not `Send`
4848 --> $DIR/future_not_send.rs:21:26
@@ -58,10 +58,10 @@ LL | async fn private_future2(rc: Rc<[u8]>, cell: &Cell<usize>) -> bool {
5858 = note: `std::cell::Cell<usize>` doesn't implement `std::marker::Sync`
5959
6060error: future cannot be sent between threads safely
61- --> $DIR/future_not_send.rs:26:43
61+ --> $DIR/future_not_send.rs:26:1
6262 |
6363LL | 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`
6565 |
6666note: captured value is not `Send`
6767 --> $DIR/future_not_send.rs:26:29
@@ -71,10 +71,10 @@ LL | pub async fn public_future2(rc: Rc<[u8]>) {}
7171 = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Send`
7272
7373error: future cannot be sent between threads safely
74- --> $DIR/future_not_send.rs:38:39
74+ --> $DIR/future_not_send.rs:38:5
7575 |
7676LL | async fn private_future(&self) -> usize {
77- | ^^^^^ future returned by `private_future` is not `Send`
77+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ future returned by `private_future` is not `Send`
7878 |
7979note: future is not `Send` as this value is used across an await
8080 --> $DIR/future_not_send.rs:40:24
@@ -87,10 +87,10 @@ LL | async { true }.await;
8787 = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Sync`
8888
8989error: future cannot be sent between threads safely
90- --> $DIR/future_not_send.rs:44:39
90+ --> $DIR/future_not_send.rs:44:5
9191 |
9292LL | pub async fn public_future(&self) {
93- | ^ future returned by `public_future` is not `Send`
93+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ future returned by `public_future` is not `Send`
9494 |
9595note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
9696 --> $DIR/future_not_send.rs:44:32
@@ -100,10 +100,13 @@ LL | pub async fn public_future(&self) {
100100 = note: `std::rc::Rc<[u8]>` doesn't implement `std::marker::Sync`
101101
102102error: future cannot be sent between threads safely
103- --> $DIR/future_not_send.rs:55:37
103+ --> $DIR/future_not_send.rs:55:1
104104 |
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`
107110 |
108111note: future is not `Send` as this value is used across an await
109112 --> $DIR/future_not_send.rs:61:20
@@ -115,10 +118,10 @@ LL | async { true }.await;
115118 = note: `T` doesn't implement `std::marker::Sync`
116119
117120error: future cannot be sent between threads safely
118- --> $DIR/future_not_send.rs:73:34
121+ --> $DIR/future_not_send.rs:73:1
119122 |
120123LL | 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`
122125 |
123126note: captured value is not `Send`
124127 --> $DIR/future_not_send.rs:73:28
0 commit comments