mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
823bacb6e3
This reverts commit 9de1a472b6
.
23 lines
1.0 KiB
Plaintext
23 lines
1.0 KiB
Plaintext
error[E0277]: `Foo<T, U>` cannot be sent between threads safely
|
|
--> $DIR/issue-83857-ub.rs:22:38
|
|
|
|
|
LL | fn generic<T, U>(v: Foo<T, U>, f: fn(<Foo<T, U> as WithAssoc>::Output) -> i32) {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo<T, U>` cannot be sent between threads safely
|
|
|
|
|
= help: the trait `Send` is not implemented for `Foo<T, U>`
|
|
note: required for `Foo<T, U>` to implement `WithAssoc`
|
|
--> $DIR/issue-83857-ub.rs:15:15
|
|
|
|
|
LL | impl<T: Send> WithAssoc for T {
|
|
| ---- ^^^^^^^^^ ^
|
|
| |
|
|
| unsatisfied trait bound introduced here
|
|
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
|
|
|
|
|
LL | fn generic<T, U>(v: Foo<T, U>, f: fn(<Foo<T, U> as WithAssoc>::Output) -> i32) where Foo<T, U>: Send {
|
|
| +++++++++++++++++++++
|
|
|
|
error: aborting due to previous error
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|