]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / issue-68642-broken-llvm-ir.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-68642-broken-llvm-ir.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-68642-broken-llvm-ir.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 |
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`.