Skip to content

Commit

Permalink
Simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Nov 9, 2018
1 parent 24289a0 commit a90240d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/librustc/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1607,16 +1607,10 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
match self.hir.get(node_id) {
Node::Item(item) => {
match item.node {
ItemKind::Trait(..)
| ItemKind::TraitAlias(..)
| ItemKind::Mod(..)
| ItemKind::ForeignMod(..)
| ItemKind::GlobalAsm(..)
| ItemKind::ExternCrate(..)
| ItemKind::Use(..) => {
ItemKind::Fn(..) => { /* type_of_def_id() will work */ }
_ => {
return None;
}
_ => { /* type_of_def_id() will work */ }
}
}
_ => { /* type_of_def_id() will work or panic */ }
Expand Down

0 comments on commit a90240d

Please sign in to comment.