about summary refs log tree commit diff
path: root/compiler/rustc_passes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-25 16:35:19 +0000
committerbors <bors@rust-lang.org>2021-03-25 16:35:19 +0000
commitcb473c2c5b72289470fa4de00474b7239013f11f (patch)
treea7691ae8a7716ceeda9072e87ceb02b7634721c9 /compiler/rustc_passes
parent6e17a5c5fd086ebe6f57216fb3ce5d1d8d6c83e5 (diff)
parent4c0b7ac7ba97092faf4a1322981ad6e5b1f01111 (diff)
downloadrust-cb473c2c5b72289470fa4de00474b7239013f11f.tar.gz
rust-cb473c2c5b72289470fa4de00474b7239013f11f.zip
Auto merge of #83424 - cjgillot:noparam, r=lcnr
GenericParam does not need to be a HIR owner.

The special case is not required.

Universal impl traits design to regular generic parameters, and their content is owned by the enclosing item.

Existential (and opaque) impl traits generate their own enclosing item, and are collected through it.
Diffstat (limited to 'compiler/rustc_passes')
-rw-r--r--compiler/rustc_passes/src/hir_id_validator.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/compiler/rustc_passes/src/hir_id_validator.rs b/compiler/rustc_passes/src/hir_id_validator.rs
index 79e3b5952ac..944a3097a61 100644
--- a/compiler/rustc_passes/src/hir_id_validator.rs
+++ b/compiler/rustc_passes/src/hir_id_validator.rs
@@ -172,17 +172,4 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for HirIdValidator<'a, 'hir> {
         // 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),
-            ..
-        } = param.kind
-        {
-            // Synthetic impl trait parameters are owned by the node of the desugared type.
-            // This means it is correct for them to have a different owner.
-        } else {
-            intravisit::walk_generic_param(self, param);
-        }
-    }
 }