]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr
diagnostics: give a special note for unsafe fn / Fn/FnOnce/FnMut
[rust.git] / src / test / ui / unboxed-closures / unboxed-closure-sugar-used-on-struct-1.stderr
1 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
2   --> $DIR/unboxed-closure-sugar-used-on-struct-1.rs:8:16
3    |
4 LL |     let x: Box<Bar()> = panic!();
5    |                ^^^^^ only `Fn` traits may use parentheses
6
7 error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied
8   --> $DIR/unboxed-closure-sugar-used-on-struct-1.rs:8:16
9    |
10 LL |     let x: Box<Bar()> = panic!();
11    |                ^^^ expected 1 generic argument
12    |
13 note: struct defined here, with 1 generic parameter: `A`
14   --> $DIR/unboxed-closure-sugar-used-on-struct-1.rs:3:8
15    |
16 LL | struct Bar<A> {
17    |        ^^^ -
18 help: add missing generic argument
19    |
20 LL |     let x: Box<Bar(A)> = panic!();
21    |                    +
22
23 error: aborting due to 2 previous errors
24
25 Some errors have detailed explanations: E0107, E0214.
26 For more information about an error, try `rustc --explain E0107`.