]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/pat_util.rs
Refactor definitions of ADTs in rustc::middle::def
[rust.git] / src / librustc / middle / pat_util.rs
index 1284e9fd1454eab7044b9cdd7e263f0c170f4f2a..b187c0d8897086f8010a89bf0c01a1740ad8d0ff 100644 (file)
@@ -228,7 +228,7 @@ pub fn necessary_variants(dm: &DefMap, pat: &hir::Pat) -> Vec<DefId> {
             hir::PatIdent(_, _, None) |
             hir::PatStruct(..) => {
                 match dm.get(&p.id) {
-                    Some(&PathResolution { base_def: DefVariant(_, id, _), .. }) => {
+                    Some(&PathResolution { base_def: DefVariant(_, id), .. }) => {
                         variants.push(id);
                     }
                     _ => ()