@@ -153,9 +153,6 @@ fn leveled_feature_err<'a, S: Into<MultiSpan>>(
153
153
154
154
}
155
155
156
- const EXPLAIN_BOX_SYNTAX : & str =
157
- "box expression syntax is experimental; you can call `Box::new` instead" ;
158
-
159
156
pub const EXPLAIN_STMT_ATTR_SYNTAX : & str =
160
157
"attributes on expressions are experimental" ;
161
158
@@ -503,9 +500,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
503
500
504
501
fn visit_expr ( & mut self , e : & ' a ast:: Expr ) {
505
502
match e. kind {
506
- ast:: ExprKind :: Box ( _) => {
507
- gate_feature_post ! ( & self , box_syntax, e. span, EXPLAIN_BOX_SYNTAX ) ;
508
- }
509
503
ast:: ExprKind :: Type ( ..) => {
510
504
// To avoid noise about type ascription in common syntax errors, only emit if it
511
505
// is the *only* error.
@@ -809,6 +803,7 @@ pub fn check_crate(krate: &ast::Crate,
809
803
gate_all ! ( exclusive_range_pattern, "exclusive range pattern syntax is experimental" ) ;
810
804
gate_all ! ( try_blocks, "`try` blocks are unstable" ) ;
811
805
gate_all ! ( label_break_value, "labels on blocks are unstable" ) ;
806
+ gate_all ! ( box_syntax, "box expression syntax is experimental; you can call `Box::new` instead" ) ;
812
807
813
808
visit:: walk_crate ( & mut visitor, krate) ;
814
809
}
0 commit comments