1 error[E0277]: the trait bound `fn(Argument) -> Return {function}: Trait` is not satisfied
2 --> $DIR/issue-99875.rs:12:11
5 | ----- ^^^^^^^^ the trait `Trait` is not implemented for fn item `fn(Argument) -> Return {function}`
7 | required by a bound introduced by this call
9 note: required by a bound in `takes`
10 --> $DIR/issue-99875.rs:9:18
12 LL | fn takes(_: impl Trait) {}
13 | ^^^^^ required by this bound in `takes`
14 help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`, try casting using `as`
16 LL | takes(function as fn(Argument) -> Return);
17 | +++++++++++++++++++++++++
19 error[E0277]: the trait bound `[closure@$DIR/issue-99875.rs:14:11: 14:34]: Trait` is not satisfied
20 --> $DIR/issue-99875.rs:14:11
22 LL | takes(|_: Argument| -> Return { todo!() });
23 | ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for closure `[closure@$DIR/issue-99875.rs:14:11: 14:34]`
25 | required by a bound introduced by this call
27 = help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`
28 note: required by a bound in `takes`
29 --> $DIR/issue-99875.rs:9:18
31 LL | fn takes(_: impl Trait) {}
32 | ^^^^^ required by this bound in `takes`
34 error: aborting due to 2 previous errors
36 For more information about this error, try `rustc --explain E0277`.