]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr
Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se
[rust.git] / src / test / 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: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`.