You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be sent between threads safely
6
6
|
7
7
= help: the trait `Send` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
8
-
= note: consider using `std::sync::Arc<<<Self as Case1>::C as Iterator>::Item>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
8
+
= note: consider whether `std::sync::Arc<<<Self as Case1>::C as Iterator>::Item>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
9
9
help: consider further restricting the associated type
10
10
|
11
11
LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Send {
| ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
31
31
|
32
32
= help: the trait `Sync` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
33
-
= note: consider using `std::sync::Arc<<<Self as Case1>::C as Iterator>::Item>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
33
+
= note: consider whether `std::sync::Arc<<<Self as Case1>::C as Iterator>::Item>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
34
34
help: consider further restricting the associated type
35
35
|
36
36
LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Sync {
Copy file name to clipboardExpand all lines: tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ LL | is_send(foo::<T>());
14
14
| ^^^^^^^^^^ future returned by `foo` is not `Send`
15
15
|
16
16
= help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>>`
17
-
= note: consider using `std::sync::Arc<impl Future<Output = Result<(), ()>>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
17
+
= note: consider whether `std::sync::Arc<impl Future<Output = Result<(), ()>>>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
18
18
note: future is not `Send` as it awaits another future which is not `Send`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
30
30
|
31
31
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
32
-
= note: consider using `std::sync::Arc<dyn std::fmt::Write>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
32
+
= note: consider whether `std::sync::Arc<dyn std::fmt::Write>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
33
33
note: future is not `Send` as this value is used across an await
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
27
27
|
28
28
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
29
-
= note: consider using `std::sync::Arc<dyn std::fmt::Write>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
29
+
= note: consider whether `std::sync::Arc<dyn std::fmt::Write>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
30
30
note: future is not `Send` as this value is used across an await
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
54
54
|
55
55
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
56
-
= note: consider using `std::sync::Arc<dyn std::fmt::Write>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
56
+
= note: consider whether `std::sync::Arc<dyn std::fmt::Write>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
57
57
note: future is not `Send` as this value is used across an await
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call_panic` is not `Send`
79
79
|
80
80
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
81
-
= note: consider using `std::sync::Arc<dyn std::fmt::Write>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
81
+
= note: consider whether `std::sync::Arc<dyn std::fmt::Write>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
82
82
note: future is not `Send` as this value is used across an await
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call_infinite_loop` is not `Send`
104
104
|
105
105
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
106
-
= note: consider using `std::sync::Arc<dyn std::fmt::Write>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
106
+
= note: consider whether `std::sync::Arc<dyn std::fmt::Write>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
107
107
note: future is not `Send` as this value is used across an await
Copy file name to clipboardExpand all lines: tests/ui/async-await/in-trait/missing-send-bound.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ LL | assert_is_send(test::<T>());
5
5
| ^^^^^^^^^^^ future returned by `test` is not `Send`
6
6
|
7
7
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
8
-
= note: consider using `std::sync::Arc<impl Future<Output = ()>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
8
+
= note: consider whether `std::sync::Arc<impl Future<Output = ()>>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
9
9
note: future is not `Send` as it awaits another future which is not `Send`
Copy file name to clipboardExpand all lines: tests/ui/async-await/issue-64130-1-sync.drop_tracking.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ LL | is_sync(bar());
5
5
| ^^^^^ future returned by `bar` is not `Sync`
6
6
|
7
7
= help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
8
-
= note: consider using `std::sync::Arc<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
8
+
= note: consider whether `std::sync::Arc<Foo>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
9
9
note: future is not `Sync` as this value is used across an await
Copy file name to clipboardExpand all lines: tests/ui/async-await/issue-64130-1-sync.drop_tracking_mir.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ LL | is_sync(bar());
5
5
| ^^^^^ future returned by `bar` is not `Sync`
6
6
|
7
7
= help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
8
-
= note: consider using `std::sync::Arc<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
8
+
= note: consider whether `std::sync::Arc<Foo>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
9
9
note: future is not `Sync` as this value is used across an await
Copy file name to clipboardExpand all lines: tests/ui/async-await/issue-64130-1-sync.no_drop_tracking.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ LL | is_sync(bar());
5
5
| ^^^^^ future returned by `bar` is not `Sync`
6
6
|
7
7
= help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
8
-
= note: consider using `std::sync::Arc<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
8
+
= note: consider whether `std::sync::Arc<Foo>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
9
9
note: future is not `Sync` as this value is used across an await
| ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
6
6
|
7
7
= help: the trait `Sync` is not implemented for `(dyn Any + Send + 'static)`
8
-
= note: consider using `std::sync::Arc<(dyn Any + Send + 'static)>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
8
+
= note: consider whether `std::sync::Arc<(dyn Any + Send + 'static)>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
9
9
note: future is not `Send` as this value is used across an await
Copy file name to clipboardExpand all lines: tests/ui/async-await/issue-64130-non-send-future-diags.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ LL | is_send(foo());
5
5
| ^^^^^ future returned by `foo` is not `Send`
6
6
|
7
7
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, u32>`
8
-
= note: consider using `std::sync::Arc<MutexGuard<'_, u32>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
8
+
= note: consider whether `std::sync::Arc<MutexGuard<'_, u32>>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
9
9
note: future is not `Send` as this value is used across an await
Copy file name to clipboardExpand all lines: tests/ui/async-await/issue-67252-unnamed-future.drop_tracking.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ LL | | });
10
10
| |_____^ future created by async block is not `Send`
11
11
|
12
12
= help: within `[async block@$DIR/issue-67252-unnamed-future.rs:21:11: 25:6]`, the trait `Send` is not implemented for `*mut ()`
13
-
= note: consider using `std::sync::Arc<*mut ()>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
13
+
= note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
14
14
note: future is not `Send` as this value is used across an await
Copy file name to clipboardExpand all lines: tests/ui/async-await/issue-67252-unnamed-future.drop_tracking_mir.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ LL | spawn(async {
5
5
| ^^^^^ future created by async block is not `Send`
6
6
|
7
7
= help: within `[async block@$DIR/issue-67252-unnamed-future.rs:21:11: 25:6]`, the trait `Send` is not implemented for `*mut ()`
8
-
= note: consider using `std::sync::Arc<*mut ()>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
8
+
= note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
9
9
note: future is not `Send` as this value is used across an await
Copy file name to clipboardExpand all lines: tests/ui/async-await/issue-67252-unnamed-future.no_drop_tracking.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ LL | | });
10
10
| |_____^ future created by async block is not `Send`
11
11
|
12
12
= help: within `[async block@$DIR/issue-67252-unnamed-future.rs:21:11: 25:6]`, the trait `Send` is not implemented for `*mut ()`
13
-
= note: consider using `std::sync::Arc<*mut ()>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
13
+
= note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
14
14
note: future is not `Send` as this value is used across an await
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
6
6
|
7
-
= note: consider using `std::sync::Arc<U>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
7
+
= note: consider whether `std::sync::Arc<U>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
6
6
|
7
-
= note: consider using `std::sync::Arc<U>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
7
+
= note: consider whether `std::sync::Arc<U>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
6
6
|
7
-
= note: consider using `std::sync::Arc<U>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
7
+
= note: consider whether `std::sync::Arc<U>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
| ^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely
6
6
|
7
7
= help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`
8
-
= note: consider using `std::sync::Arc<*mut ()>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
8
+
= note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
9
9
note: required because it appears within the type `PhantomData<*mut ()>`
10
10
--> $SRC_DIR/core/src/marker.rs:LL:COL
11
11
note: required because it appears within the type `NotSync`
| ^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely
6
6
|
7
7
= help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`
8
-
= note: consider using `std::sync::Arc<*mut ()>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
8
+
= note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
9
9
note: required because it appears within the type `PhantomData<*mut ()>`
10
10
--> $SRC_DIR/core/src/marker.rs:LL:COL
11
11
note: required because it appears within the type `NotSync`
| ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
6
6
|
7
7
= help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`
8
-
= note: consider using `std::sync::Arc<*mut ()>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
8
+
= note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
9
9
note: future is not `Send` as this value is used across an await
Copy file name to clipboardExpand all lines: tests/ui/async-await/issue-71137.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ LL | fake_spawn(wrong_mutex());
5
5
| ^^^^^^^^^^^^^ future returned by `wrong_mutex` is not `Send`
6
6
|
7
7
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, i32>`
8
-
= note: consider using `std::sync::Arc<MutexGuard<'_, i32>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
8
+
= note: consider whether `std::sync::Arc<MutexGuard<'_, i32>>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
9
9
note: future is not `Send` as this value is used across an await
Copy file name to clipboardExpand all lines: tests/ui/async-await/issue-86507.drop_tracking.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ LL | | }
8
8
LL | | )
9
9
| |_____________^ future created by async block is not `Send`
10
10
|
11
-
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
11
+
= note: consider whether `std::sync::Arc<T>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
12
12
note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
Copy file name to clipboardExpand all lines: tests/ui/async-await/issue-86507.drop_tracking_mir.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ LL | | }
8
8
LL | | )
9
9
| |_____________^ future created by async block is not `Send`
10
10
|
11
-
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
11
+
= note: consider whether `std::sync::Arc<T>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
12
12
note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
Copy file name to clipboardExpand all lines: tests/ui/async-await/issue-86507.no_drop_tracking.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ LL | | }
8
8
LL | | )
9
9
| |_____________^ future created by async block is not `Send`
10
10
|
11
-
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
11
+
= note: consider whether `std::sync::Arc<T>` could be incorporated to share this value between threads; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
12
12
note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
0 commit comments