]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/argument_order.rs
Rollup merge of #75151 - pickfire:patch-4, r=LukasKalbertodt
[rust.git] / src / test / ui / const-generics / argument_order.rs
1 #![feature(const_generics)]
2 //~^ WARN the feature `const_generics` is incomplete
3
4 struct Bad<const N: usize, T> { //~ ERROR type parameters must be declared prior
5     arr: [u8; { N }],
6     another: T,
7 }
8
9 struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
10     //~^ ERROR type parameters must be declared prior
11     //~| ERROR lifetime parameters must be declared prior
12     a: &'a T,
13     b: &'b U,
14 }
15
16 fn main() {
17     let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
18     //~^ ERROR lifetime provided when a type was expected
19  }