]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr
Rollup merge of #82308 - estebank:issue-82290, r=lcnr
[rust.git] / src / test / ui / generic-associated-types / issue-68643-broken-mir.stderr
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
10 error[E0277]: expected a `Fn<()>` closure, found `T`
11   --> $DIR/issue-68643-broken-mir.rs:15:5
12    |
13 LL |     type F<'a>: Fn() -> u32;
14    |                 ----------- required by this bound in `Fun::F`
15 ...
16 LL |     type F<'a> = Self;
17    |     ^^^^^^^^^^^^^^^^^^ expected an `Fn<()>` closure, found `T`
18    |
19    = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }`
20 help: consider restricting type parameter `T`
21    |
22 LL | impl<T: Fn<()>> Fun for T {
23    |       ^^^^^^^^
24
25 error: aborting due to previous error; 1 warning emitted
26
27 For more information about this error, try `rustc --explain E0277`.