about summary refs log tree commit diff
path: root/src/libsyntax/parse/classify.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-23 12:28:12 +0000
committerbors <bors@rust-lang.org>2019-06-23 12:28:12 +0000
commit5d677b2efdb00031564d30ee9f63f4d4f936a39f (patch)
treecf7f1b1a463a8a5ebbd802bd9cb61fe10d3fea0a /src/libsyntax/parse/classify.rs
parenta96ba969156d257e5d5b692946fa8fe40ed6543a (diff)
parentc75f7ecaee508c568c0bc01c102965ce8b2246ef (diff)
downloadrust-5d677b2efdb00031564d30ee9f63f4d4f936a39f.tar.gz
rust-5d677b2efdb00031564d30ee9f63f4d4f936a39f.zip
Auto merge of #60861 - Centril:let-chains-ast-intro, r=petrochenkov
[let_chains, 2/6] Introduce `Let(..)` in AST, remove IfLet + WhileLet and parse let chains

Here we remove `ast::ExprKind::{IfLet, WhileLet}` and introduce `ast::ExprKind::Let`.
Moreover, we also:
+ connect the parsing logic for let chains
+ introduce the feature gate
+ rewire HIR lowering a bit.

However, this does not connect the new syntax to semantics in HIR.
That will be the subject of a subsequent PR.

Per https://github.com/rust-lang/rust/issues/53667#issuecomment-471583239.
Next step after https://github.com/rust-lang/rust/pull/59288.

cc @Manishearth re. Clippy.

r? @oli-obk
Diffstat (limited to 'src/libsyntax/parse/classify.rs')
-rw-r--r--src/libsyntax/parse/classify.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs
index dfd6f451c28..6ebfab3a133 100644
--- a/src/libsyntax/parse/classify.rs
+++ b/src/libsyntax/parse/classify.rs
@@ -14,11 +14,9 @@ use crate::ast;
 pub fn expr_requires_semi_to_be_stmt(e: &ast::Expr) -> bool {
     match e.node {
         ast::ExprKind::If(..) |
-        ast::ExprKind::IfLet(..) |
         ast::ExprKind::Match(..) |
         ast::ExprKind::Block(..) |
         ast::ExprKind::While(..) |
-        ast::ExprKind::WhileLet(..) |
         ast::ExprKind::Loop(..) |
         ast::ExprKind::ForLoop(..) |
         ast::ExprKind::TryBlock(..) => false,