]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/issue-57642-higher-ranked-subtype.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / nll / issue-57642-higher-ranked-subtype.stderr
CommitLineData
5869c6ff 1error[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 |
4LL | 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
10note: `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 |
13LL | trait X {
14 | ^^^^^^^
15
16error[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 |
19LL | 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
23note: `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 |
26LL | trait Y {
27 | ^^^^^^^
28
29error: aborting due to 2 previous errors
30
31For more information about this error, try `rustc --explain E0599`.