Skip to content

Commit a90240d

Browse files
committed
Simplify logic
1 parent 24289a0 commit a90240d

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/librustc/ty/context.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -1607,16 +1607,10 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
16071607
match self.hir.get(node_id) {
16081608
Node::Item(item) => {
16091609
match item.node {
1610-
ItemKind::Trait(..)
1611-
| ItemKind::TraitAlias(..)
1612-
| ItemKind::Mod(..)
1613-
| ItemKind::ForeignMod(..)
1614-
| ItemKind::GlobalAsm(..)
1615-
| ItemKind::ExternCrate(..)
1616-
| ItemKind::Use(..) => {
1610+
ItemKind::Fn(..) => { /* type_of_def_id() will work */ }
1611+
_ => {
16171612
return None;
16181613
}
1619-
_ => { /* type_of_def_id() will work */ }
16201614
}
16211615
}
16221616
_ => { /* type_of_def_id() will work or panic */ }

0 commit comments

Comments
 (0)