2020-07-30 18:43:44 +00:00
|
|
|
// Checks that lifetimes cannot be interspersed between consts and types.
|
|
|
|
|
|
|
|
struct Foo<const N: usize, 'a, T = u32>(&'a (), T);
|
2022-09-09 14:28:57 +02:00
|
|
|
//~^ ERROR lifetime parameters must be declared prior to type and const parameters
|
2020-07-30 18:43:44 +00:00
|
|
|
|
2020-07-30 20:53:32 +00:00
|
|
|
struct Bar<const N: usize, T = u32, 'a>(&'a (), T);
|
2022-09-09 14:28:57 +02:00
|
|
|
//~^ ERROR lifetime parameters must be declared prior to type and const parameters
|
2020-07-30 20:53:32 +00:00
|
|
|
|
2020-07-30 18:43:44 +00:00
|
|
|
fn main() {}
|