]> git.lizzy.rs Git - rust.git/blob - tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.rs
Rollup merge of #106856 - vadorovsky:fix-atomic-annotations, r=joshtriplett
[rust.git] / tests / ui / unboxed-closures / unboxed-closure-sugar-used-on-struct-1.rs
1 // Test that parentheses form doesn't work with struct types appearing in local variables.
2
3 struct Bar<A> {
4     f: A
5 }
6
7 fn bar() {
8     let x: Box<Bar()> = panic!();
9     //~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
10     //~| ERROR this struct takes 1 generic argument but 0 generic arguments
11 }
12
13 fn main() { }