-// run-pass
+//[full] run-pass
+// revisions: min full
-#![feature(const_generics)]
-//~^ WARN the feature `const_generics` is incomplete
+#![cfg_attr(full, feature(const_generics))]
+#![cfg_attr(full, allow(incomplete_features))]
+#![cfg_attr(min, feature(min_const_generics))]
pub fn function_with_str<const STRING: &'static str>() -> &'static str {
+ //[min]~^ ERROR using `&'static str` as const
STRING
}
pub fn function_with_bytes<const BYTES: &'static [u8]>() -> &'static [u8] {
+ //[min]~^ ERROR using `&'static [u8]` as const
BYTES
}