Skip to content

Commit

Permalink
Auto merge of rust-lang#70737 - Centril:cleanup-lower-item-id, r=este…
Browse files Browse the repository at this point in the history
…bank

cleanup `lower_item_id`

r? @oli-obk
  • Loading branch information
bors committed Apr 6, 2020
2 parents bd18bc9 + abe0c2d commit 4015890
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/librustc_ast_lowering/item.rs
Original file line number Diff line number Diff line change
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 4015890

Please sign in to comment.