mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
15 lines
353 B
Rust
15 lines
353 B
Rust
struct Bad<const N: usize, T> {
|
|
arr: [u8; { N }],
|
|
another: T,
|
|
}
|
|
|
|
struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
|
|
//~^ ERROR lifetime parameters must be declared prior
|
|
a: &'a T,
|
|
b: &'b U,
|
|
}
|
|
|
|
fn main() {
|
|
let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
|
|
//~^ ERROR lifetime provided when a type was expected
|
|
}
|