rust/src/test/ui/const-generics/argument_order.rs

17 lines
424 B
Rust
Raw Normal View History

#![feature(const_generics)]
2020-04-22 10:21:32 +02:00
//~^ WARN the feature `const_generics` is incomplete
struct Bad<const N: usize, T> { //~ ERROR type parameters must be declared prior
arr: [u8; { N }],
another: T,
}
2020-07-23 13:19:35 +02:00
struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
//~^ ERROR type parameters must be declared prior
//~| ERROR lifetime parameters must be declared prior
a: &'a T,
b: &'b U,
}
fn main() { }