summaryrefslogtreecommitdiffstats
path: root/src/test/ui/feature-gates/feature-gate-box-expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/feature-gates/feature-gate-box-expr.rs')
-rw-r--r--src/test/ui/feature-gates/feature-gate-box-expr.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-box-expr.rs b/src/test/ui/feature-gates/feature-gate-box-expr.rs
new file mode 100644
index 000000000..870253d2f
--- /dev/null
+++ b/src/test/ui/feature-gates/feature-gate-box-expr.rs
@@ -0,0 +1,14 @@
+// gate-test-box_syntax
+
+// Check that `box EXPR` is feature-gated.
+//
+// See also feature-gate-placement-expr.rs
+//
+// (Note that the two tests are separated since the checks appear to
+// be performed at distinct phases, with an abort_if_errors call
+// separating them.)
+
+fn main() {
+ let x = box 'c'; //~ ERROR box expression syntax is experimental
+ println!("x: {}", x);
+}