summaryrefslogtreecommitdiffstats
path: root/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.rs
blob: bd61cbd80220e15665ec2c4473e1b8ac35b373b8 (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 this struct takes 1 generic argument but 0 generic arguments
}

fn main() { }