]>
Commit | Line | Data |
---|---|---|
5869c6ff | 1 | #![feature(generic_associated_types)] |
5869c6ff XL |
2 | |
3 | trait X { | |
4 | type Y<'a>; | |
5869c6ff XL |
5 | } |
6 | ||
7 | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {} | |
8 | //~^ ERROR: lifetime in trait object type must be followed by `+` | |
9 | //~| ERROR: parenthesized generic arguments cannot be used | |
17df50a5 XL |
10 | //~| ERROR this associated type takes 0 generic arguments but 1 generic argument |
11 | //~| ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments | |
5869c6ff | 12 | |
923072b8 FG |
13 | |
14 | fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {} | |
15 | //~^ ERROR: parenthesized generic arguments cannot be used | |
16 | //~| ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments | |
17 | ||
5869c6ff | 18 | fn main() {} |