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

fn foo<const X: (), T>(_: T) {
    //~^ ERROR type parameters must be declared prior to const parameters
    //~^^ ERROR const generics in any position are currently unsupported
}

fn bar<const X: (), 'a>(_: &'a ()) {
    //~^ ERROR lifetime parameters must be declared prior to const parameters
    //~^^ ERROR const generics in any position are currently unsupported
}

fn main() {}