#![allow(unknown_features)]
#![feature(unsafe_destructor, slicing_syntax)]
-#![feature(old_impl_check)]
+ #![feature(box_syntax)]
#![feature(unboxed_closures)]
+#![feature(old_impl_check)]
#![no_std]
#[macro_use]
html_root_url = "http://doc.rust-lang.org/nightly/",
html_playground_url = "http://play.rust-lang.org/")]
#![allow(unknown_features)]
-#![feature(slicing_syntax)]
+#![cfg_attr(stage0, allow(unused_attributes))]
+ #![feature(box_syntax)]
#![feature(old_impl_check)]
-#![cfg_attr(stage0, allow(unused_attributes))]
+#![feature(slicing_syntax)]
// test harness access
#[cfg(test)] extern crate test;
#![feature(linkage, thread_local, asm)]
#![feature(lang_items, unsafe_destructor)]
#![feature(slicing_syntax, unboxed_closures)]
+ #![feature(box_syntax)]
#![feature(old_impl_check)]
-#![cfg_attr(stage0, allow(unused_attributes))]
// Don't link to std. We are std.
#![no_std]
}
fn visit_expr(&mut self, e: &ast::Expr) {
- ast::ExprRange(..) => {
- self.gate_feature("slicing_syntax",
- e.span,
- "range syntax is experimental");
- }
+ match e.node {
+ ast::ExprBox(..) | ast::ExprUnary(ast::UnOp::UnUniq, _) => {
+ self.gate_feature("box_syntax",
+ e.span,
+ "box expression syntax is experimental in alpha release; \
+ you can call `Box::new` instead.");
+ }
+ _ => {}
+ }
visit::walk_expr(self, e);
}