Do not visit ForeignItemRef for HIR indexing and validation.
Similarly to what is done for ImplItemRef and TraitItemRef. Fixes #79487
This commit is contained in:
parent
4ae328bef4
commit
5bd197921a
3 changed files with 27 additions and 0 deletions
|
@ -169,6 +169,13 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for HirIdValidator<'a, 'hir> {
|
|||
// different owner.
|
||||
}
|
||||
|
||||
fn visit_foreign_item_ref(&mut self, _: &'hir hir::ForeignItemRef<'hir>) {
|
||||
// Explicitly do nothing here. ForeignItemRefs contain hir::Visibility
|
||||
// values that actually belong to an ForeignItem instead of the ItemKind::ForeignMod
|
||||
// we are currently in. So for those it's correct that they have a
|
||||
// different owner.
|
||||
}
|
||||
|
||||
fn visit_generic_param(&mut self, param: &'hir hir::GenericParam<'hir>) {
|
||||
if let hir::GenericParamKind::Type {
|
||||
synthetic: Some(hir::SyntheticTyParamKind::ImplTrait),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue