2021-05-07 13:00:17 -05:00
|
|
|
error[E0277]: `Foo<T, U>` cannot be sent between threads safely
|
2024-02-19 14:39:25 -06:00
|
|
|
--> $DIR/issue-83857-ub.rs:21: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
|
|
|
|
|
|
2024-10-24 16:14:17 -05:00
|
|
|
= help: the trait `Send` is not implemented for `Foo<T, U>`
|
2021-05-07 13:00:17 -05:00
|
|
|
note: required for `Foo<T, U>` to implement `WithAssoc`
|
2024-02-19 14:39:25 -06:00
|
|
|
--> $DIR/issue-83857-ub.rs:14: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 {
|
|
|
|
| +++++++++++++++++++++
|
|
|
|
|
2024-02-09 06:17:55 -06:00
|
|
|
error[E0277]: `Foo<T, U>` cannot be sent between threads safely
|
2024-02-19 14:39:25 -06:00
|
|
|
--> $DIR/issue-83857-ub.rs:21:80
|
2024-02-09 06:17:55 -06:00
|
|
|
|
|
|
|
|
LL | fn generic<T, U>(v: Foo<T, U>, f: fn(<Foo<T, U> as WithAssoc>::Output) -> i32) {
|
|
|
|
| ________________________________________________________________________________^
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | | f(foo(v));
|
|
|
|
LL | |
|
|
|
|
LL | | }
|
|
|
|
| |_^ `Foo<T, U>` cannot be sent between threads safely
|
|
|
|
|
|
2024-10-24 16:14:17 -05:00
|
|
|
= help: the trait `Send` is not implemented for `Foo<T, U>`
|
2024-02-09 06:17:55 -06:00
|
|
|
note: required for `Foo<T, U>` to implement `WithAssoc`
|
2024-02-19 14:39:25 -06:00
|
|
|
--> $DIR/issue-83857-ub.rs:14:15
|
2024-02-09 06:17:55 -06: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 {
|
|
|
|
| +++++++++++++++++++++
|
|
|
|
|
|
|
|
error[E0277]: `Foo<T, U>` cannot be sent between threads safely
|
2024-02-19 14:39:25 -06:00
|
|
|
--> $DIR/issue-83857-ub.rs:24:11
|
2024-02-09 06:17:55 -06:00
|
|
|
|
|
|
|
|
LL | f(foo(v));
|
|
|
|
| --- ^ `Foo<T, U>` cannot be sent between threads safely
|
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
|
|
|
|
|
|
|
|
= help: the trait `Send` is not implemented for `Foo<T, U>`
|
|
|
|
note: required by a bound in `foo`
|
2024-02-19 14:39:25 -06:00
|
|
|
--> $DIR/issue-83857-ub.rs:28:11
|
2024-02-09 06:17:55 -06:00
|
|
|
|
|
|
|
|
LL | fn foo<T: Send>(x: T) -> <T as WithAssoc>::Output {
|
|
|
|
| ^^^^ required by this bound in `foo`
|
|
|
|
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 3 previous errors
|
2021-05-07 13:00:17 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|