]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_ast_borrowck/cfg/construct.rs
or-patterns: use `top_pats_hack` to make things compile.
[rust.git] / src / librustc_ast_borrowck / cfg / construct.rs
index 0dc999083a91a93c88ffcf3f0419657ad0ddc408..e2c5de648a2766f93b63e2716aae7244b5848481 100644 (file)
@@ -390,7 +390,7 @@ fn match_(&mut self, id: hir::ItemLocalId, discr: &hir::Expr,
             // patterns and the guard (if there is one) in the arm.
             let bindings_exit = self.add_dummy_node(&[]);
 
-            for pat in &arm.pats {
+            for pat in arm.top_pats_hack() {
                 // Visit the pattern, coming from the discriminant exit
                 let mut pat_exit = self.pat(&pat, discr_exit);