]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/defaults/intermixed-lifetime.rs
Auto merge of #106908 - cjgillot:copyprop-ssa, r=oli-obk
[rust.git] / tests / ui / const-generics / defaults / intermixed-lifetime.rs
1 // Checks that lifetimes cannot be interspersed between consts and types.
2
3 struct Foo<const N: usize, 'a, T = u32>(&'a (), T);
4 //~^ ERROR lifetime parameters must be declared prior to type and const parameters
5
6 struct Bar<const N: usize, T = u32, 'a>(&'a (), T);
7 //~^ ERROR lifetime parameters must be declared prior to type and const parameters
8
9 fn main() {}