2020-07-30 13:39:53 -05:00
|
|
|
struct Bad<const N: usize, T> {
|
2020-03-19 14:20:09 -05:00
|
|
|
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> {
|
2020-08-31 05:35:04 -05:00
|
|
|
//~^ 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>;
|
2020-08-31 05:35:04 -05:00
|
|
|
//~^ ERROR lifetime provided when a type was expected
|
2020-07-23 07:30:01 -05:00
|
|
|
}
|