]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs
Rollup merge of #89825 - martinvonz:split-inclusive-empty, r=m-ou-se
[rust.git] / src / test / ui / generic-associated-types / gat-trait-path-parenthesised-args.rs
1 #![feature(generic_associated_types)]
2
3 trait X {
4   type Y<'a>;
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
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
12   //~| WARNING: trait objects without an explicit `dyn` are deprecated
13   //~| WARNING: this is accepted in the current edition
14
15 fn main() {}