summary refs log tree commit diff
path: root/src/test/ui/const-generics/const-param-before-other-params.rs
blob: 0a7b57fe626b1b0212adc96a62c511032f7b17b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// revisions: full min
#![cfg_attr(full, feature(const_generics_defaults))]
#![cfg_attr(full, allow(incomplete_features))]

fn bar<const X: u8, 'a>(_: &'a ()) {
    //~^ ERROR lifetime parameters must be declared prior to const parameters
}

fn foo<const X: u8, T>(_: &T) {}
//[min]~^ ERROR type parameters must be declared prior to const parameters

fn main() {}