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