]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr
35a4350804e8b59e714d7970f0486d41e560b34a
[rustc.git] / src / test / ui / generic-associated-types / issue-68645-codegen-fulfillment.stderr
1 error[E0277]: expected a `Fn<()>` closure, found `T`
2 --> $DIR/issue-68645-codegen-fulfillment.rs:14:5
3 |
4 LL | type F<'a> = Self;
5 | ^^^^^^^^^^^^^^^^^^ expected an `Fn<()>` closure, found `T`
6 |
7 = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }`
8 note: required by a bound in `Fun::F`
9 --> $DIR/issue-68645-codegen-fulfillment.rs:6:17
10 |
11 LL | type F<'a>: Fn() -> u32;
12 | ^^^^^^^^^^^ required by this bound in `Fun::F`
13 help: consider restricting type parameter `T`
14 |
15 LL | impl<T: std::ops::Fn<()>> Fun for T {
16 | ++++++++++++++++++
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0277`.