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 06:19:35 -05:00
struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
//~^ ERROR lifetime parameters must be declared prior
2020-07-23 06:19:35 -05:00
a: &'a T,
b: &'b U,
}
2020-07-23 07:30:01 -05:00
fn main() {
let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
//~^ ERROR lifetime provided when a type was expected
2020-07-23 07:30:01 -05:00
}