2020-08-26 18:22:55 +08:00
|
|
|
// revisions: full min
|
|
|
|
#![cfg_attr(full, feature(const_generics))]
|
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
2019-02-05 17:55:25 +01:00
|
|
|
|
|
|
|
fn bar<const X: (), 'a>(_: &'a ()) {
|
2020-08-31 18:35:04 +08:00
|
|
|
//~^ ERROR lifetime parameters must be declared prior to const parameters
|
|
|
|
//[min]~^^ ERROR `()` is forbidden as the type of a const generic parameter
|
2019-02-05 17:55:25 +01:00
|
|
|
}
|
|
|
|
|
2020-07-30 18:39:53 +00:00
|
|
|
fn foo<const X: (), T>(_: &T) {}
|
2020-08-26 18:22:55 +08:00
|
|
|
//[min]~^ ERROR type parameters must be declared prior to const parameters
|
|
|
|
//[min]~^^ ERROR `()` is forbidden as the type of a const generic parameter
|
2019-05-04 14:38:10 +01:00
|
|
|
|
2019-02-05 17:55:25 +01:00
|
|
|
fn main() {}
|