|
1 | 1 | use std::ops::ControlFlow; |
2 | 2 |
|
3 | | -use crate::{ |
4 | | - ty::{BoundRegion, BoundRegionKind}, |
5 | | - Opaque, |
6 | | -}; |
| 3 | +use crate::Opaque; |
7 | 4 |
|
8 | 5 | use super::ty::{ |
9 | 6 | Allocation, Binder, Const, ConstDef, ExistentialPredicate, FnSig, GenericArgKind, GenericArgs, |
@@ -112,34 +109,11 @@ impl Visitable for Region { |
112 | 109 | visitor.visit_reg(self) |
113 | 110 | } |
114 | 111 |
|
115 | | - fn super_visit<V: Visitor>(&self, visitor: &mut V) -> ControlFlow<V::Break> { |
116 | | - match self.kind.clone() { |
117 | | - crate::ty::RegionKind::ReEarlyBound(_) => {} |
118 | | - crate::ty::RegionKind::ReLateBound(_, bound_reg) => bound_reg.visit(visitor)?, |
119 | | - crate::ty::RegionKind::ReStatic => {} |
120 | | - crate::ty::RegionKind::RePlaceholder(bound_reg) => bound_reg.bound.visit(visitor)?, |
121 | | - crate::ty::RegionKind::ReErased => {} |
122 | | - } |
| 112 | + fn super_visit<V: Visitor>(&self, _: &mut V) -> ControlFlow<V::Break> { |
123 | 113 | ControlFlow::Continue(()) |
124 | 114 | } |
125 | 115 | } |
126 | 116 |
|
127 | | -impl Visitable for BoundRegion { |
128 | | - fn super_visit<V: Visitor>(&self, visitor: &mut V) -> ControlFlow<V::Break> { |
129 | | - self.kind.visit(visitor) |
130 | | - } |
131 | | -} |
132 | | - |
133 | | -impl Visitable for BoundRegionKind { |
134 | | - fn super_visit<V: Visitor>(&self, _visitor: &mut V) -> ControlFlow<V::Break> { |
135 | | - match self { |
136 | | - BoundRegionKind::BrAnon => ControlFlow::Continue(()), |
137 | | - BoundRegionKind::BrNamed(_, _) => ControlFlow::Continue(()), |
138 | | - BoundRegionKind::BrEnv => ControlFlow::Continue(()), |
139 | | - } |
140 | | - } |
141 | | -} |
142 | | - |
143 | 117 | impl Visitable for GenericArgKind { |
144 | 118 | fn super_visit<V: Visitor>(&self, visitor: &mut V) -> ControlFlow<V::Break> { |
145 | 119 | match self { |
|
0 commit comments