2021-05-07 13:00:17 -05:00
|
|
|
error[E0277]: `Foo<T, U>` cannot be sent between threads safely
|
2023-07-28 13:15:12 -05:00
|
|
|
--> $DIR/issue-83857-ub.rs:22:38
|
2021-05-07 13:00:17 -05:00
|
|
|
|
|
|
|
|
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`
|
2023-07-28 13:15:12 -05:00
|
|
|
--> $DIR/issue-83857-ub.rs:15:15
|
2021-05-07 13:00:17 -05:00
|
|
|
|
|
|
|
|
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 {
|
|
|
|
| +++++++++++++++++++++
|
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2021-05-07 13:00:17 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|