Add a new test to prevent regressions on the box syntax as well as its
feature gate.
gcc/testsuite/ChangeLog:
* rust/compile/box_syntax.rs: New test.
* rust/compile/box_syntax_feature_gate.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
--- /dev/null
+// { dg-options "-fsyntax-only" }
+#![feature(box_syntax)]
+
+fn main() {
+ let x: Box<_> = box 1;
+}
--- /dev/null
+// { dg-options "-frust-compile-until=lowering" }
+
+fn main() {
+ let x: Box<_> = box 1; //{ dg-error "box expression syntax is experimental." "" { target *-*-* } }
+}