fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.0 KiB22 linesraw
1error[E0277]: `Foo<T, U>` cannot be sent between threads safely
2  --> $DIR/issue-83857-ub.rs:22:38
3   |
4LL | fn generic<T, U>(v: Foo<T, U>, f: fn(<Foo<T, U> as WithAssoc>::Output) -> i32) {
5   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo<T, U>` cannot be sent between threads safely
6   |
7   = help: the trait `Send` is not implemented for `Foo<T, U>`
8note: required for `Foo<T, U>` to implement `WithAssoc`
9  --> $DIR/issue-83857-ub.rs:15:15
10   |
11LL | impl<T: Send> WithAssoc for T {
12   |         ----  ^^^^^^^^^     ^
13   |         |
14   |         unsatisfied trait bound introduced here
15help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
16   |
17LL | fn generic<T, U>(v: Foo<T, U>, f: fn(<Foo<T, U> as WithAssoc>::Output) -> i32) where Foo<T, U>: Send {
18   |                                                                                +++++++++++++++++++++
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0277`.