diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-06-26 17:50:11 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-07-07 13:17:00 +0000 |
| commit | 2f89c963d3777e03d0ff9f0bcfc11b148a4c0af7 (patch) | |
| tree | 9b2ee732afa29fc5b4180c489688c2722cd5506a /compiler/rustc_ty_utils/src | |
| parent | 907f97e4111b1e52cef13203ec4515449ab4ae59 (diff) | |
| download | rust-2f89c963d3777e03d0ff9f0bcfc11b148a4c0af7.tar.gz rust-2f89c963d3777e03d0ff9f0bcfc11b148a4c0af7.zip | |
We don't need to track binders if we aren't normalizing
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/opaque_types.rs | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/compiler/rustc_ty_utils/src/opaque_types.rs b/compiler/rustc_ty_utils/src/opaque_types.rs index bf5f1bb747c..146f7cd371c 100644 --- a/compiler/rustc_ty_utils/src/opaque_types.rs +++ b/compiler/rustc_ty_utils/src/opaque_types.rs @@ -21,21 +21,12 @@ struct OpaqueTypeCollector<'tcx> { /// Avoid infinite recursion due to recursive declarations. seen: FxHashSet<LocalDefId>, - universes: Vec<Option<ty::UniverseIndex>>, - span: Option<Span>, } impl<'tcx> OpaqueTypeCollector<'tcx> { fn new(tcx: TyCtxt<'tcx>, item: LocalDefId) -> Self { - Self { - tcx, - opaques: Vec::new(), - item, - seen: Default::default(), - universes: vec![], - span: None, - } + Self { tcx, opaques: Vec::new(), item, seen: Default::default(), span: None } } fn span(&self) -> Span { @@ -109,16 +100,6 @@ impl<'tcx> OpaqueTypeCollector<'tcx> { } impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for OpaqueTypeCollector<'tcx> { - fn visit_binder<T: TypeVisitable<TyCtxt<'tcx>>>( - &mut self, - t: &ty::Binder<'tcx, T>, - ) -> ControlFlow<!> { - self.universes.push(None); - let t = t.super_visit_with(self); - self.universes.pop(); - t - } - #[instrument(skip(self), ret, level = "trace")] fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<!> { t.super_visit_with(self)?; |
