]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-before-other-params.rs
Rollup merge of #83041 - guswynn:stable_debug_struct, r=m-ou-se
[rust.git] / src / test / ui / const-generics / const-param-before-other-params.rs
1 // revisions: full min
2 #![cfg_attr(full, feature(const_generics))]
3 #![cfg_attr(full, allow(incomplete_features))]
4
5 fn bar<const X: (), 'a>(_: &'a ()) {
6     //~^ ERROR lifetime parameters must be declared prior to const parameters
7     //[min]~^^ ERROR `()` is forbidden as the type of a const generic parameter
8 }
9
10 fn foo<const X: (), T>(_: &T) {}
11 //[min]~^ ERROR type parameters must be declared prior to const parameters
12 //[min]~^^ ERROR `()` is forbidden as the type of a const generic parameter
13
14 fn main() {}