File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/libsyntax/feature_gate Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -145,9 +145,6 @@ fn leveled_feature_err<'a, S: Into<MultiSpan>>(
145
145
146
146
}
147
147
148
- const EXPLAIN_BOX_SYNTAX : & str =
149
- "box expression syntax is experimental; you can call `Box::new` instead" ;
150
-
151
148
struct PostExpansionVisitor < ' a > {
152
149
parse_sess : & ' a ParseSess ,
153
150
features : & ' a Features ,
@@ -507,7 +504,10 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
507
504
fn visit_expr ( & mut self , e : & ' a ast:: Expr ) {
508
505
match e. kind {
509
506
ast:: ExprKind :: Box ( _) => {
510
- gate_feature_post ! ( & self , box_syntax, e. span, EXPLAIN_BOX_SYNTAX ) ;
507
+ gate_feature_post ! (
508
+ & self , box_syntax, e. span,
509
+ "box expression syntax is experimental; you can call `Box::new` instead"
510
+ ) ;
511
511
}
512
512
ast:: ExprKind :: Type ( ..) => {
513
513
// To avoid noise about type ascription in common syntax errors, only emit if it
You can’t perform that action at this time.
0 commit comments