]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/bad-const-generic-exprs.rs
1 struct Wow
<const N
: usize>;
4 let _
: Wow
<if true {}
>;
5 //~^ ERROR invalid const generic expression
6 //~| HELP expressions must be enclosed in braces to be used as const generic arguments
8 //~^ ERROR invalid const generic expression
9 //~| HELP expressions must be enclosed in braces to be used as const generic arguments
11 //~^ ERROR expected one of
12 //~| HELP expressions must be enclosed in braces to be used as const generic arguments
14 //~^ ERROR expected one of
15 //~| HELP expressions must be enclosed in braces to be used as const generic arguments
17 // FIXME(compiler-errors): This one is still unsatisfying,
18 // and probably a case I could see someone typing by accident..
20 //~^ ERROR expected type, found
21 //~| ERROR type provided when a constant was expected