about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2019-08-24 14:19:32 -0700
committerSantiago Pastorino <spastorino@gmail.com>2019-08-24 21:00:50 -0400
commit717e8a5219c491d0e8e865cc6abafc6fce6c4dff (patch)
treee6aeea28a4f81c18bf941735292533b2a6efc4f6
parent59c063302f3ce8e3020a94183c1cf4f203119ab2 (diff)
downloadrust-717e8a5219c491d0e8e865cc6abafc6fce6c4dff.tar.gz
rust-717e8a5219c491d0e8e865cc6abafc6fce6c4dff.zip
Join arms patterns, body is empty in all arms
-rw-r--r--src/librustc/mir/visit.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/librustc/mir/visit.rs b/src/librustc/mir/visit.rs
index 2d16e7bcc83..24420cb4d7e 100644
--- a/src/librustc/mir/visit.rs
+++ b/src/librustc/mir/visit.rs
@@ -724,10 +724,6 @@ macro_rules! make_mir_visitor {
                 }
 
                 match & $($mutability)? proj.elem {
-                    ProjectionElem::Deref => {
-                    }
-                    ProjectionElem::Subslice { from: _, to: _ } => {
-                    }
                     ProjectionElem::Field(_field, ty) => {
                         self.visit_ty(ty, TyContext::Location(location));
                     }
@@ -738,11 +734,12 @@ macro_rules! make_mir_visitor {
                             location
                         );
                     }
+                    ProjectionElem::Deref |
+                    ProjectionElem::Subslice { from: _, to: _ } |
                     ProjectionElem::ConstantIndex { offset: _,
                                                     min_length: _,
-                                                    from_end: _ } => {
-                    }
-                    ProjectionElem::Downcast(_name, _variant_index) => {
+                                                    from_end: _ } |
+                    ProjectionElem::Downcast(_, _) => {
                     }
                 }
             }