Skip to content

Commit 2f89c96

Browse files
committed
We don't need to track binders if we aren't normalizing
1 parent 907f97e commit 2f89c96

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

compiler/rustc_ty_utils/src/opaque_types.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,12 @@ struct OpaqueTypeCollector<'tcx> {
2121
/// Avoid infinite recursion due to recursive declarations.
2222
seen: FxHashSet<LocalDefId>,
2323

24-
universes: Vec<Option<ty::UniverseIndex>>,
25-
2624
span: Option<Span>,
2725
}
2826

2927
impl<'tcx> OpaqueTypeCollector<'tcx> {
3028
fn new(tcx: TyCtxt<'tcx>, item: LocalDefId) -> Self {
31-
Self {
32-
tcx,
33-
opaques: Vec::new(),
34-
item,
35-
seen: Default::default(),
36-
universes: vec![],
37-
span: None,
38-
}
29+
Self { tcx, opaques: Vec::new(), item, seen: Default::default(), span: None }
3930
}
4031

4132
fn span(&self) -> Span {
@@ -109,16 +100,6 @@ impl<'tcx> OpaqueTypeCollector<'tcx> {
109100
}
110101

111102
impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for OpaqueTypeCollector<'tcx> {
112-
fn visit_binder<T: TypeVisitable<TyCtxt<'tcx>>>(
113-
&mut self,
114-
t: &ty::Binder<'tcx, T>,
115-
) -> ControlFlow<!> {
116-
self.universes.push(None);
117-
let t = t.super_visit_with(self);
118-
self.universes.pop();
119-
t
120-
}
121-
122103
#[instrument(skip(self), ret, level = "trace")]
123104
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<!> {
124105
t.super_visit_with(self)?;

0 commit comments

Comments
 (0)