forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#10866 - est31:manual_let_else_pattern, r=Mani…
…shearth manual_let_else: support struct patterns This adds upon the improvements of rust-lang#10797 and: * Only prints `()` around `Or` patterns at the top level (fixing a regression of rust-lang#10797) * Supports multi-binding patterns: `let (u, v) = if let (Some(u_i), Ok(v_i)) = ex { (u_i, v_i) } else ...` * Traverses through tuple patterns: `let v = if let (Some(v), None) = ex { v } else ...` * Supports struct patterns: `let v = if let S { v, w, } = ex { (v, w) } else ...` ``` changelog: [`manual_let_else`]: improve pattern printing to support struct patterns ``` fixes rust-lang#10708 fixes rust-lang#10424
- Loading branch information
Showing
5 changed files
with
299 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.