]>
Commit | Line | Data |
---|---|---|
5869c6ff | 1 | error[E0599]: the function or associated item `make_g` exists for fn pointer `for<'r> fn(&'r ())`, but its trait bounds were not satisfied |
923072b8 | 2 | --> $DIR/issue-57642-higher-ranked-subtype.rs:31:25 |
29967ef6 XL |
3 | | |
4 | LL | let x = <fn (&())>::make_g(); | |
5869c6ff | 5 | | ^^^^^^ function or associated item cannot be called on `for<'r> fn(&'r ())` due to unsatisfied trait bounds |
29967ef6 | 6 | | |
5869c6ff | 7 | = note: the following trait bounds were not satisfied: |
29967ef6 XL |
8 | `for<'r> fn(&'r ()): X` |
9 | = help: items from traits can only be used if the trait is implemented and in scope | |
10 | note: `X` defines an item `make_g`, perhaps you need to implement it | |
923072b8 | 11 | --> $DIR/issue-57642-higher-ranked-subtype.rs:4:1 |
29967ef6 XL |
12 | | |
13 | LL | trait X { | |
14 | | ^^^^^^^ | |
15 | ||
16 | error[E0599]: no function or associated item named `make_f` found for fn pointer `for<'r> fn(&'r ())` in the current scope | |
923072b8 | 17 | --> $DIR/issue-57642-higher-ranked-subtype.rs:35:25 |
29967ef6 XL |
18 | | |
19 | LL | let x = <fn (&())>::make_f(); | |
20 | | ^^^^^^ function or associated item not found in `for<'r> fn(&'r ())` | |
21 | | | |
22 | = help: items from traits can only be used if the trait is implemented and in scope | |
23 | note: `Y` defines an item `make_f`, perhaps you need to implement it | |
923072b8 | 24 | --> $DIR/issue-57642-higher-ranked-subtype.rs:17:1 |
29967ef6 XL |
25 | | |
26 | LL | trait Y { | |
27 | | ^^^^^^^ | |
28 | ||
29 | error: aborting due to 2 previous errors | |
30 | ||
31 | For more information about this error, try `rustc --explain E0599`. |