]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0277]: expected a `Fn<()>` closure, found `T` |
136023e0 | 2 | --> $DIR/issue-68642-broken-llvm-ir.rs:14:5 |
f035d41b XL |
3 | | |
4 | LL | type F<'a>: Fn() -> u32; | |
29967ef6 | 5 | | ----------- required by this bound in `Fun::F` |
f035d41b XL |
6 | ... |
7 | LL | type F<'a> = Self; | |
8 | | ^^^^^^^^^^^^^^^^^^ expected an `Fn<()>` closure, found `T` | |
9 | | | |
3dfed10e | 10 | = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }` |
f035d41b XL |
11 | help: consider restricting type parameter `T` |
12 | | | |
cdc7bbd5 XL |
13 | LL | impl<T: std::ops::Fn<()>> Fun for T { |
14 | | ^^^^^^^^^^^^^^^^^^ | |
f035d41b | 15 | |
136023e0 | 16 | error: aborting due to previous error |
f035d41b XL |
17 | |
18 | For more information about this error, try `rustc --explain E0277`. |