]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/const-generics/const-param-before-other-params.rs
Auto merge of #75584 - RalfJung:union-no-deref, r=matthewjasper
[rust.git] / src / test / ui / const-generics / const-param-before-other-params.rs
index 0d787d9a67b590d5ccd052ca8bbe563d80f05ad9..f1be90cf2e418a62413c151c84e61c9c77b71121 100644 (file)
@@ -1,10 +1,15 @@
-#![allow(incomplete_features)]
-#![feature(const_generics)]
+// 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() {}