mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
10 lines
360 B
Rust
10 lines
360 B
Rust
// Checks that lifetimes cannot be interspersed between consts and types.
|
|
|
|
struct Foo<const N: usize, 'a, T = u32>(&'a (), T);
|
|
//~^ ERROR lifetime parameters must be declared prior to type and const parameters
|
|
|
|
struct Bar<const N: usize, T = u32, 'a>(&'a (), T);
|
|
//~^ ERROR lifetime parameters must be declared prior to type and const parameters
|
|
|
|
fn main() {}
|