2014-11-27 06:59:21 -05:00
|
|
|
// Test that parentheses form doesn't work with struct types appearing in argument types.
|
|
|
|
|
2015-01-12 10:27:25 -05:00
|
|
|
struct Bar<A> {
|
|
|
|
f: A
|
2014-11-27 06:59:21 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn foo(b: Box<Bar()>) {
|
2019-01-20 02:45:38 -08:00
|
|
|
//~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
|
2021-05-12 13:35:12 +02:00
|
|
|
//~| ERROR this struct takes 1 generic argument but 0 generic arguments
|
2014-11-27 06:59:21 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|