11error[E0277]: the trait bound `fn(Argument) -> Return {function}: Trait` is not satisfied
2- --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:12 :11
2+ --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:14 :11
33 |
44LL | takes(function);
55 | ----- ^^^^^^^^ the trait `Trait` is not implemented for fn item `fn(Argument) -> Return {function}`
66 | |
77 | required by a bound introduced by this call
88 |
99note: required by a bound in `takes`
10- --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:9 :18
10+ --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:11 :18
1111 |
1212LL | fn takes(_: impl Trait) {}
1313 | ^^^^^ required by this bound in `takes`
@@ -16,18 +16,18 @@ help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`,
1616LL | takes(function as fn(Argument) -> Return);
1717 | +++++++++++++++++++++++++
1818
19- error[E0277]: the trait bound `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:14 :11: 14 :34}: Trait` is not satisfied
20- --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:14 :11
19+ error[E0277]: the trait bound `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:16 :11: 16 :34}: Trait` is not satisfied
20+ --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:16 :11
2121 |
2222LL | takes(|_: Argument| -> Return { todo!() });
2323 | ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
2424 | |
2525 | required by a bound introduced by this call
2626 |
27- = help: the trait `Trait` is not implemented for closure `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:14 :11: 14 :34}`
27+ = help: the trait `Trait` is not implemented for closure `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:16 :11: 16 :34}`
2828 = help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`
2929note: required by a bound in `takes`
30- --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:9 :18
30+ --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:11 :18
3131 |
3232LL | fn takes(_: impl Trait) {}
3333 | ^^^^^ required by this bound in `takes`
0 commit comments