2 #![cfg_attr(full, allow(incomplete_features))]
3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(min, feature(min_const_generics))]
6 fn test<const N: usize>() {
7 struct Foo<const M: usize>;
10 [u8; $x] //[full]~ ERROR constant expression depends
15 [u8; { $x }] //[full]~ ERROR constant expression depends
20 Foo<$x> //[full]~ ERROR constant expression depends
25 Foo<{ $x }> //[full]~ ERROR constant expression depends
31 let _: foo!({{ N }}); //[min]~ ERROR generic parameters may not
33 let _: bar!({ N }); //[min]~ ERROR generic parameters may not
34 let _: baz!(N); //~ ERROR expressions must be enclosed in braces
36 let _: baz!({{ N }}); //[min]~ ERROR generic parameters may not
38 let _: biz!({ N }); //[min]~ ERROR generic parameters may not
50 let _: foo!({ 10 + 7 });
51 let _: foo!({{ 10 + 7 }});
53 let _: bar!({ 10 + 7 });
54 let _: baz!(10 + 7); //~ ERROR expressions must be enclosed in braces
55 let _: baz!({ 10 + 7 });
56 let _: baz!({{ 10 + 7 }});
58 let _: biz!({ 10 + 7 });