Skip to content

Commit

Permalink
Move DefLabel out from the def_id() results
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Oct 1, 2015
1 parent cb784b7 commit 95ce1eb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/librustc/middle/def.rs
Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit 95ce1eb

Please sign in to comment.