summary refs log tree commit diff
path: root/src/test/ui/const-generics/const-param-before-other-params.rs
blob: 2c81681b85e7ddfb6cc9e07e530e67e77dcf9b76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash

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

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

fn main() {}