]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-57642-higher-ranked-subtype.stderr
Auto merge of #105145 - Ayush1325:sequential-remote-server, r=Mark-Simulacrum
[rust.git] / src / test / ui / nll / issue-57642-higher-ranked-subtype.stderr
1 error[E0599]: the function or associated item `make_g` exists for fn pointer `for<'a> fn(&'a ())`, but its trait bounds were not satisfied
2   --> $DIR/issue-57642-higher-ranked-subtype.rs:31:25
3    |
4 LL |     let x = <fn (&())>::make_g();
5    |                         ^^^^^^ function or associated item cannot be called on `for<'a> fn(&'a ())` due to unsatisfied trait bounds
6    |
7    = note: the following trait bounds were not satisfied:
8            `for<'a> fn(&'a ()): 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
11   --> $DIR/issue-57642-higher-ranked-subtype.rs:4:1
12    |
13 LL | trait X {
14    | ^^^^^^^
15
16 error[E0599]: no function or associated item named `make_f` found for fn pointer `for<'a> fn(&'a ())` in the current scope
17   --> $DIR/issue-57642-higher-ranked-subtype.rs:35:25
18    |
19 LL |     let x = <fn (&())>::make_f();
20    |                         ^^^^^^ function or associated item not found in `for<'a> fn(&'a ())`
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
24   --> $DIR/issue-57642-higher-ranked-subtype.rs:17:1
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`.