2014-11-27 05:59:21 -06:00
|
|
|
// Test that parentheses form doesn't work with struct types appearing in local variables.
|
|
|
|
|
2015-01-12 09:27:25 -06:00
|
|
|
struct Bar<A> {
|
|
|
|
f: A
|
2014-11-27 05:59:21 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn bar() {
|
|
|
|
let x: Box<Bar()> = panic!();
|
2019-01-20 04:45:38 -06:00
|
|
|
//~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
|
2023-02-23 11:27:06 -06:00
|
|
|
//~| ERROR struct takes 1 generic argument but 0 generic arguments
|
2014-11-27 05:59:21 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|