cleanup lower_item_id
This commit is contained in:
parent
424c793925
commit
abe0c2de43
@ -165,19 +165,10 @@ pub(super) fn lower_mod(&mut self, m: &Mod) -> hir::Mod<'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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user