]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.rs
Rollup merge of #106043 - c410-f3r:moar-errors, r=petrochenkov
[rust.git] / src / test / ui / unboxed-closures / unboxed-closure-sugar-used-on-struct.rs
1 // Test that parentheses form doesn't work with struct types appearing in argument types.
2
3 struct Bar<A> {
4     f: A
5 }
6
7 fn foo(b: Box<Bar()>) {
8     //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
9     //~| ERROR this struct takes 1 generic argument but 0 generic arguments
10 }
11
12 fn main() { }