Remove hir::Guard
Use Expr instead. Use `ExprKind::Let` to represent if let guards.
This commit is contained in:
parent
5113ed28ea
commit
407cb24142
17 changed files with 77 additions and 109 deletions
|
@ -1874,17 +1874,9 @@ impl<'a> State<'a> {
|
|||
self.print_pat(arm.pat);
|
||||
self.space();
|
||||
if let Some(ref g) = arm.guard {
|
||||
match *g {
|
||||
hir::Guard::If(e) => {
|
||||
self.word_space("if");
|
||||
self.print_expr(e);
|
||||
self.space();
|
||||
}
|
||||
hir::Guard::IfLet(&hir::Let { pat, ty, init, .. }) => {
|
||||
self.word_nbsp("if");
|
||||
self.print_let(pat, ty, init);
|
||||
}
|
||||
}
|
||||
self.word_space("if");
|
||||
self.print_expr(g);
|
||||
self.space();
|
||||
}
|
||||
self.word_space("=>");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue