]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/const-generics/issues/issue-71169.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / const-generics / issues / issue-71169.rs
index 943a16cfcd6a7fb2ed02ea5ec08d53411f34e779..7007ec222caa8440baedbcf45ca2e954a53edcda 100644 (file)
@@ -1,10 +1,13 @@
-#![feature(const_generics)]
-#![allow(incomplete_features)]
+// revisions: full min
+#![cfg_attr(full, feature(const_generics))]
+#![cfg_attr(full, allow(incomplete_features))]
+#![cfg_attr(min, feature(min_const_generics))]
 
 fn foo<const LEN: usize, const DATA: [u8; LEN]>() {}
 //~^ ERROR the type of const parameters must not
+//[min]~^^ ERROR `[u8; _]` is forbidden as the type of a const generic parameter
 fn main() {
     const DATA: [u8; 4] = *b"ABCD";
     foo::<4, DATA>();
-    //~^ ERROR constant expression depends on
+    //[full]~^ ERROR constant expression depends on
 }