add guard patterns to HIR and implement lowering
This commit is contained in:
@@ -1999,6 +1999,12 @@ impl<'a> State<'a> {
|
||||
self.commasep(Inconsistent, after, |s, p| s.print_pat(p));
|
||||
self.word("]");
|
||||
}
|
||||
PatKind::Guard(inner, cond) => {
|
||||
self.print_pat(inner);
|
||||
self.space();
|
||||
self.word_space("if");
|
||||
self.print_expr(cond);
|
||||
}
|
||||
PatKind::Err(_) => {
|
||||
self.popen();
|
||||
self.word("/*ERROR*/");
|
||||
|
||||
Reference in New Issue
Block a user