Skip to content

Commit c72426a

Browse files
committed
use pre-expansion feature gate, gate_all! instead
1 parent 5aba0a6 commit c72426a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
352352
}
353353
_ => (),
354354
},
355-
ast::ExprKind::Move(_, move_kw_span) => {
356-
gate!(&self, move_expr, move_kw_span, "`move(expr)` syntax is experimental");
357-
}
358355
_ => {}
359356
}
360357
visit::walk_expr(self, e)
@@ -505,6 +502,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
505502
gate_all!(impl_restriction, "`impl` restrictions are experimental");
506503
gate_all!(min_generic_const_args, "unbraced const blocks as const args are experimental");
507504
gate_all!(more_qualified_paths, "usage of qualified paths in this context is experimental");
505+
gate_all!(move_expr, "`move(expr)` syntax is experimental");
508506
gate_all!(mut_ref, "mutable by-reference bindings are experimental");
509507
gate_all!(pin_ergonomics, "pinned reference syntax is experimental");
510508
gate_all!(postfix_match, "postfix match is experimental");

0 commit comments

Comments
 (0)