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