summary refs log tree commit diff
path: root/src/test/ui/const-generics/defaults/intermixed-lifetime.rs
blob: ea3a8c14b98cb2d38c76a4c687895121e63e620b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Checks that lifetimes cannot be interspersed between consts and types.

#![feature(const_generics)]
#![allow(incomplete_features)]

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() {}