Fix def -> PathResolution

This commit is contained in:
Manish Goregaokar 2015-03-13 19:51:09 +05:30
parent 0d37323fd3
commit 825f49a89a

View file

@ -165,7 +165,7 @@ pub fn necessary_variants(dm: &DefMap, pat: &ast::Pat) -> Vec<ast::NodeId> {
ast::PatIdent(_, _, None) | ast::PatIdent(_, _, None) |
ast::PatStruct(..) => { ast::PatStruct(..) => {
match dm.borrow().get(&p.id) { match dm.borrow().get(&p.id) {
Some(&DefVariant(_, id, _)) => { Some(&PathResolution {base_def: DefVariant(_, id, _), ..}) => {
variants.push(id.node); variants.push(id.node);
} }
_ => () _ => ()