11error: future cannot be sent between threads safely
2- --> tests/ui/future_not_send.rs:8:1
2+ --> tests/ui/future_not_send.rs:8:62
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 --> tests/ui/future_not_send.rs:11: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- --> tests/ui/future_not_send.rs:14:1
26+ --> tests/ui/future_not_send.rs:14:41
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 --> tests/ui/future_not_send.rs:17: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- --> tests/ui/future_not_send.rs:24:1
42+ --> tests/ui/future_not_send.rs:24:63
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 --> tests/ui/future_not_send.rs:24: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- --> tests/ui/future_not_send.rs:30:1
61+ --> tests/ui/future_not_send.rs:30:42
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 --> tests/ui/future_not_send.rs:30: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- --> tests/ui/future_not_send.rs:42:5
74+ --> tests/ui/future_not_send.rs:42:39
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 --> tests/ui/future_not_send.rs:45: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- --> tests/ui/future_not_send.rs:49:5
90+ --> tests/ui/future_not_send.rs:49:38
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 --> tests/ui/future_not_send.rs:49:32
@@ -100,13 +100,10 @@ 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- --> tests/ui/future_not_send.rs:61:1
103+ --> tests/ui/future_not_send.rs:61:37
104104 |
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`
105+ LL | async fn generic_future<T>(t: T) -> T
106+ | ^ future returned by `generic_future` is not `Send`
110107 |
111108note: future is not `Send` as this value is used across an await
112109 --> tests/ui/future_not_send.rs:67:20
@@ -118,10 +115,10 @@ LL | async { true }.await;
118115 = note: `T` doesn't implement `std::marker::Sync`
119116
120117error: future cannot be sent between threads safely
121- --> tests/ui/future_not_send.rs:83:1
118+ --> tests/ui/future_not_send.rs:83:51
122119 |
123120LL | async fn generic_future_always_unsend<T>(_: Rc<T>) {
124- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ future returned by `generic_future_always_unsend` is not `Send`
121+ | ^ future returned by `generic_future_always_unsend` is not `Send`
125122 |
126123note: future is not `Send` as this value is used across an await
127124 --> tests/ui/future_not_send.rs:86:20
0 commit comments