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>>(
145145
146146}
147147
148- const EXPLAIN_BOX_SYNTAX : & str =
149- "box expression syntax is experimental; you can call `Box::new` instead" ;
150-
151148struct PostExpansionVisitor < ' a > {
152149 parse_sess : & ' a ParseSess ,
153150 features : & ' a Features ,
@@ -507,7 +504,10 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
507504 fn visit_expr ( & mut self , e : & ' a ast:: Expr ) {
508505 match e. kind {
509506 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+ ) ;
511511 }
512512 ast:: ExprKind :: Type ( ..) => {
513513 // 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