]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-before-other-params.rs
Rustdoc render public underscore_imports as Re-exports
[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 #![cfg_attr(min, feature(min_const_generics))]
5
6 fn bar<const X: (), 'a>(_: &'a ()) {
7     //~^ ERROR lifetime parameters must be declared prior to const parameters
8     //[min]~^^ ERROR `()` is forbidden as the type of a const generic parameter
9 }
10
11 fn foo<const X: (), T>(_: &T) {}
12 //[min]~^ ERROR type parameters must be declared prior to const parameters
13 //[min]~^^ ERROR `()` is forbidden as the type of a const generic parameter
14
15 fn main() {}