2017-07-28 20:47:12 -05:00
|
|
|
// Test that parentheses form parses in expression paths.
|
2014-11-27 05:59:21 -06:00
|
|
|
|
|
|
|
struct Bar<A,R> {
|
|
|
|
f: A, r: R
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<A,B> Bar<A,B> {
|
|
|
|
fn new() -> Bar<A,B> { panic!() }
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bar() {
|
2017-07-28 20:47:12 -05:00
|
|
|
let b = Bar::<isize, usize>::new(); // OK
|
2014-11-27 05:59:21 -06:00
|
|
|
|
2017-07-28 20:47:12 -05:00
|
|
|
let b = Bar::(isize, usize)::new(); // OK too (for the parser)
|
2019-01-20 04:45:38 -06:00
|
|
|
//~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
|
2014-11-27 05:59:21 -06:00
|
|
|
}
|
|
|
|
|
2017-07-28 20:47:12 -05:00
|
|
|
fn main() {}
|