]> git.proxmox.com Git - rustc.git/blob - tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / generic-associated-types / parse / trait-path-missing-gen_arg.rs
1 trait X {
2 type Y<'a>;
3 }
4
5 const _: () = {
6 fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
7 //~^ ERROR: expected one of `>`, a const expression, lifetime, or type, found `:`
8 //~| ERROR: expected parameter name, found `>`
9 //~| ERROR: expected one of `!`, `)`, `+`, `,`, or `::`, found `>`
10 //~| ERROR: constant provided when a type was expected
11 };
12
13 const _: () = {
14 fn f1<'a>(arg : Box<dyn X< = 32 >>) {}
15 //~^ ERROR: expected one of `>`, a const expression, lifetime, or type, found `=`
16 };
17
18 fn main() {}