summaryrefslogtreecommitdiffstats
path: root/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.rs
blob: 657b29204cda71354ce8e844289793b9d33ff639 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Test that parentheses form doesn't work with struct types appearing in argument types.

struct Bar<A> {
    f: A
}

fn foo(b: Box<Bar()>) {
    //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
    //~| ERROR struct takes 1 generic argument but 0 generic arguments
}

fn main() { }