]> git.lizzy.rs Git - rust.git/blob - tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr
Auto merge of #107054 - petrochenkov:effvisdoc3, r=GuillaumeGomez
[rust.git] / tests / ui / unboxed-closures / unboxed-closure-sugar-used-on-struct-3.stderr
1 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
2   --> $DIR/unboxed-closure-sugar-used-on-struct-3.rs:14:13
3    |
4 LL |     let b = Bar::(isize, usize)::new(); // OK too (for the parser)
5    |             ^^^^^^^^^^^^^^^^^^^ only `Fn` traits may use parentheses
6    |
7 help: use angle brackets instead
8    |
9 LL |     let b = Bar::<isize, usize>::new(); // OK too (for the parser)
10    |                  ~            ~
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0214`.