1
1
error[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:15 :11
3
3
|
4
4
LL | takes(function);
5
5
| ----- ^^^^^^^^ the trait `Trait` is not implemented for fn item `fn(Argument) -> Return {function}`
6
6
| |
7
7
| required by a bound introduced by this call
8
8
|
9
9
note: 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:12 :18
11
11
|
12
12
LL | fn takes(_: impl Trait) {}
13
13
| ^^^^^ required by this bound in `takes`
@@ -16,18 +16,18 @@ help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`,
16
16
LL | takes(function as fn(Argument) -> Return);
17
17
| +++++++++++++++++++++++++
18
18
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:17 :11: 17 :34}: Trait` is not satisfied
20
+ --> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:17 :11
21
21
|
22
22
LL | takes(|_: Argument| -> Return { todo!() });
23
23
| ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
24
24
| |
25
25
| required by a bound introduced by this call
26
26
|
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:17 :11: 17 :34}`
28
28
= help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`
29
29
note: 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:12 :18
31
31
|
32
32
LL | fn takes(_: impl Trait) {}
33
33
| ^^^^^ required by this bound in `takes`
0 commit comments