]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc/hir/pat_util.rs
New upstream version 1.13.0+dfsg1
[rustc.git] / src / librustc / hir / pat_util.rs
index 593d10ef4f7c4a9910c020b9a4218dc5f345fbba..dec41fdfc3b50c35a4693339c61948d6488a3407 100644 (file)
@@ -53,7 +53,7 @@ impl<T: ExactSizeIterator> EnumerateAndAdjustIterator for T {
 
 pub fn pat_is_refutable(dm: &DefMap, pat: &hir::Pat) -> bool {
     match pat.node {
-        PatKind::Lit(_) | PatKind::Range(_, _) | PatKind::Path(Some(..), _) => true,
+        PatKind::Lit(_) | PatKind::Range(..) | PatKind::Path(Some(..), _) => true,
         PatKind::TupleStruct(..) |
         PatKind::Path(..) |
         PatKind::Struct(..) => {
@@ -62,7 +62,7 @@ pub fn pat_is_refutable(dm: &DefMap, pat: &hir::Pat) -> bool {
                 _ => false
             }
         }
-        PatKind::Vec(_, _, _) => true,
+        PatKind::Vec(..) => true,
         _ => false
     }
 }
@@ -174,7 +174,7 @@ pub fn necessary_variants(dm: &DefMap, pat: &hir::Pat) -> Vec<DefId> {
             PatKind::Path(..) |
             PatKind::Struct(..) => {
                 match dm.get(&p.id) {
-                    Some(&PathResolution { base_def: Def::Variant(_, id), .. }) => {
+                    Some(&PathResolution { base_def: Def::Variant(id), .. }) => {
                         variants.push(id);
                     }
                     _ => ()