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

struct Bar<A> {
    f: A
}

fn bar() {
    let x: Box<Bar()> = panic!();
    //~^ 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() { }