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(..) => {
_ => false
}
}
- PatKind::Vec(_, _, _) => true,
+ PatKind::Vec(..) => true,
_ => false
}
}
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);
}
_ => ()