("tuple_indexing", Accepted),
("associated_types", Accepted),
("visible_private_types", Active),
- ("slicing_syntax", Accepted),
+ ("slicing_syntax", Active),
+ ("box_syntax", Active),
("if_let", Accepted),
("while_let", Accepted),
}
fn visit_expr(&mut self, e: &ast::Expr) {
+ 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);
}
but at the end of a slice (e.g. \
`[0, ..xs, 0]` are experimental")
}
+ ast::PatBox(..) => {
+ self.gate_feature("box_syntax",
+ pattern.span,
+ "box pattern syntax is experimental in alpha release");
+ }
_ => {}
}
visit::walk_pat(self, pattern)