]> git.lizzy.rs Git - rust.git/commit
Auto merge of #53815 - F001:if-let-guard, r=petrochenkov
authorbors <bors@rust-lang.org>
Sat, 1 Sep 2018 20:31:29 +0000 (20:31 +0000)
committerbors <bors@rust-lang.org>
Sat, 1 Sep 2018 20:31:29 +0000 (20:31 +0000)
commit28bcffead74d5e17c6cb1f7de432e37f93a6b50c
tree1abf601a008600ac3a23c22c1ce003c571dee816
parentf39f218ec33d93e8a1b0ac4282f62ee35e02c18a
parent7a083ca25f14833d704d2efba5ca9b431f6c65ad
Auto merge of #53815 - F001:if-let-guard, r=petrochenkov

refactor match guard

This is the first step to implement RFC 2294: if-let-guard. Tracking issue: https://github.com/rust-lang/rust/issues/51114

The second step should be introducing another variant `IfLet` in the Guard enum. I separated them into 2 PRs for the convenience of reviewers.

r? @petrochenkov
19 files changed:
src/librustc/hir/lowering.rs
src/librustc/hir/mod.rs
src/librustc/hir/print.rs
src/librustc/ich/impls_hir.rs
src/librustc/middle/expr_use_visitor.rs
src/librustc/middle/liveness.rs
src/librustc/middle/region.rs
src/librustc_mir/hair/cx/expr.rs
src/librustc_mir/hair/mod.rs
src/librustc_mir/hair/pattern/check_match.rs
src/librustc_passes/rvalue_promotion.rs
src/librustc_resolve/lib.rs
src/librustc_save_analysis/dump_visitor.rs
src/librustc_typeck/check/_match.rs
src/libsyntax/ast.rs
src/libsyntax/fold.rs
src/libsyntax/parse/parser.rs
src/libsyntax/print/pprust.rs
src/libsyntax/visit.rs