blob: 508bb3e6a689ecc28ab5ecb8cce3eec34e13a695 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// revisions: full min
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]
fn bar<const X: (), 'a>(_: &'a ()) {
//~^ ERROR lifetime parameters must be declared prior to const parameters
//[min]~^^ ERROR `()` is forbidden as the type of a const generic parameter
}
fn foo<const X: (), T>(_: &T) {}
//[min]~^ ERROR type parameters must be declared prior to const parameters
//[min]~^^ ERROR `()` is forbidden as the type of a const generic parameter
fn main() {}
|