summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/defaults/intermixed-lifetime.rs
blob: beaf7fc6001a94ecf334753e4f0d698976092b72 (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 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() {}