rust/tests/ui/const-generics/argument_order.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
353 B
Rust
Raw Normal View History

struct Bad<const N: usize, T> {
arr: [u8; { N }],
another: T,
}
2020-07-23 11:19:35 +00:00
struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
//~^ ERROR lifetime parameters must be declared prior
2020-07-23 11:19:35 +00:00
a: &'a T,
b: &'b U,
}
2020-07-23 12:30:01 +00:00
fn main() {
let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
//~^ ERROR lifetime provided when a type was expected
2020-07-23 12:30:01 +00:00
}