]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs
Rollup merge of #102954 - GuillaumeGomez:cfg-hide-attr-checks, r=Manishearth
[rust.git] / src / test / ui / generic-associated-types / gat-trait-path-parenthesised-args.rs
1 trait X {
2   type Y<'a>;
3 }
4
5 fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
6   //~^ ERROR: lifetime in trait object type must be followed by `+`
7   //~| ERROR: parenthesized generic arguments cannot be used
8   //~| ERROR this associated type takes 0 generic arguments but 1 generic argument
9   //~| ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments
10
11
12 fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
13   //~^ ERROR: parenthesized generic arguments cannot be used
14   //~| ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments
15
16 fn main() {}