blob: f1be90cf2e418a62413c151c84e61c9c77b71121 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// revisions: full min
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(min, feature(min_const_generics))]
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() {}
|