]>
Commit | Line | Data |
---|---|---|
f035d41b XL |
1 | warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes |
2 | --> $DIR/issue-68643-broken-mir.rs:3:12 | |
3 | | | |
4 | LL | #![feature(generic_associated_types)] | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^ | |
6 | | | |
7 | = note: `#[warn(incomplete_features)]` on by default | |
8 | = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information | |
9 | ||
1b1a35ee | 10 | error[E0277]: expected a `Fn<()>` closure, found `T` |
f035d41b XL |
11 | --> $DIR/issue-68643-broken-mir.rs:15:5 |
12 | | | |
13 | LL | type F<'a>: Fn() -> u32; | |
14 | | ------------------------ required by `Fun::F` | |
15 | ... | |
16 | LL | type F<'a> = Self; | |
17 | | ^^^^^^^^^^^^^^^^^^ expected an `Fn<()>` closure, found `T` | |
18 | | | |
3dfed10e | 19 | = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }` |
f035d41b XL |
20 | help: consider restricting type parameter `T` |
21 | | | |
1b1a35ee XL |
22 | LL | impl<T: Fn<()>> Fun for T { |
23 | | ^^^^^^^^ | |
f035d41b XL |
24 | |
25 | error: aborting due to previous error; 1 warning emitted | |
26 | ||
27 | For more information about this error, try `rustc --explain E0277`. |