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
9
help: consider further restricting the associated type
9
10
|
10
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
30
31
|
31
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>
32
34
help: consider further restricting the associated type
33
35
|
34
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
Original file line number
Diff line number
Diff line change
@@ -14,6 +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
18
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/in-trait/missing-send-bound.stderr
+1
Original file line number
Diff line number
Diff line change
@@ -5,6 +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
9
note: future is not `Send` as it awaits another future which is not `Send`
| ^^^^^^^^^^^^^^^^^^ 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
9
note: future is not `Send` as this value is used across an await
0 commit comments