Skip to content

Commit 9626181

Browse files
committed
check.rs: inline a constant
1 parent b45f21d commit 9626181

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libsyntax/feature_gate/check.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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-
151148
struct 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

0 commit comments

Comments
 (0)