Move DefLabel out from the def_id() results

This commit is contained in:
Niko Matsakis 2015-09-07 14:27:13 -04:00
parent cb784b70ba
commit 95ce1ebe7c
1 changed files with 5 additions and 3 deletions

View File

@ -142,13 +142,15 @@ impl Def {
DefLocal(id) |
DefUpvar(id, _, _) |
DefLabel(id) |
DefSelfTy(_, Some((_, id))) => {
DefId::xxx_local(id) // TODO, clearly
}
DefPrimTy(_) => panic!("attempted .def_id() on DefPrimTy"),
DefSelfTy(..) => panic!("attempted .def_id() on invalid DefSelfTy"),
DefLabel(..) |
DefPrimTy(..) |
DefSelfTy(..) => {
panic!("attempted .def_id() on invalid def: {:?}", self)
}
}
}