]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/issue-68643-broken-mir.stderr
Auto merge of #106696 - kylematsuda:early-binder, r=lcnr
[rust.git] / tests / ui / generic-associated-types / issue-68643-broken-mir.stderr
1 error[E0277]: expected a `Fn<()>` closure, found `T`
2   --> $DIR/issue-68643-broken-mir.rs:12:18
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-68643-broken-mir.rs:4: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`.