Skip to content

Commit

Permalink
cleanup lower_item_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Apr 3, 2020
1 parent 424c793 commit abe0c2d
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/librustc_ast_lowering/item.rs
Expand Up @@ -165,19 +165,10 @@ impl<'hir> LoweringContext<'_, 'hir> {
}
ItemKind::MacroDef(..) => SmallVec::new(),
ItemKind::Fn(..) | ItemKind::Impl { of_trait: None, .. } => smallvec![i.id],
ItemKind::Static(ref ty, ..) => {
ItemKind::Static(ref ty, ..) | ItemKind::Const(_, ref ty, ..) => {
let mut ids = smallvec![i.id];
if self.sess.features_untracked().impl_trait_in_bindings {
let mut visitor = ImplTraitTypeIdVisitor { ids: &mut ids };
visitor.visit_ty(ty);
}
ids
}
ItemKind::Const(_, ref ty, ..) => {
let mut ids = smallvec![i.id];
if self.sess.features_untracked().impl_trait_in_bindings {
let mut visitor = ImplTraitTypeIdVisitor { ids: &mut ids };
visitor.visit_ty(ty);
ImplTraitTypeIdVisitor { ids: &mut ids }.visit_ty(ty);
}
ids
}
Expand Down

0 comments on commit abe0c2d

Please sign in to comment.