summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/defaults/intermixed-lifetime.rs
blob: 578938db4c43e8affbaff63a08d19f97b42ad69f (plain)
1
2
3
4
5
6
7
8
9
// 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 const parameters

struct Bar<const N: usize, T = u32, 'a>(&'a (), T);
//~^ Error lifetime parameters must be declared prior to type parameters

fn main() {}