]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/argument_order.rs
Merge commit 'b7f3f7f6082679da2da9a0b3faf1b5adef3afd3b' into clippyup
[rust.git] / src / test / ui / const-generics / argument_order.rs
1 // revisions: full min
2 #![cfg_attr(full, feature(const_generics_defaults))]
3
4 struct Bad<const N: usize, T> {
5     //[min]~^ ERROR type parameters must be declared prior to const parameters
6     arr: [u8; { N }],
7     another: T,
8 }
9
10 struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
11     //~^ ERROR lifetime parameters must be declared prior
12     //[min]~^^ ERROR type parameters must be declared prior to const parameters
13     a: &'a T,
14     b: &'b U,
15 }
16
17 fn main() {
18     let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
19     //~^ ERROR lifetime provided when a type was expected
20  }