@@ -100,23 +100,6 @@ impl<'tcx> Visitor<'tcx> for FindNestedTypeVisitor<'tcx> {
100
100
// the lifetime of the TyRptr
101
101
let hir_id = lifetime. hir_id ;
102
102
match ( self . tcx . named_region ( hir_id) , self . bound_region ) {
103
- // Find the index of the anonymous region that was part of the
104
- // error. We will then search the function parameters for a bound
105
- // region at the right depth with the same index
106
- (
107
- Some ( rl:: Region :: LateBoundAnon ( debruijn_index, _, anon_index) ) ,
108
- ty:: BrAnon ( br_index) ,
109
- ) => {
110
- debug ! (
111
- "LateBoundAnon depth = {:?} anon_index = {:?} br_index={:?}" ,
112
- debruijn_index, anon_index, br_index
113
- ) ;
114
- if debruijn_index == self . current_index && anon_index == br_index {
115
- self . found_type = Some ( arg) ;
116
- return ; // we can stop visiting now
117
- }
118
- }
119
-
120
103
// Find the index of the named region that was part of the
121
104
// error. We will then search the function parameters for a bound
122
105
// region at the right depth with the same index
@@ -151,8 +134,7 @@ impl<'tcx> Visitor<'tcx> for FindNestedTypeVisitor<'tcx> {
151
134
rl:: Region :: Static
152
135
| rl:: Region :: Free ( _, _)
153
136
| rl:: Region :: EarlyBound ( _, _)
154
- | rl:: Region :: LateBound ( _, _, _)
155
- | rl:: Region :: LateBoundAnon ( _, _, _) ,
137
+ | rl:: Region :: LateBound ( _, _, _) ,
156
138
)
157
139
| None ,
158
140
_,
@@ -206,16 +188,6 @@ impl<'tcx> Visitor<'tcx> for TyPathVisitor<'tcx> {
206
188
fn visit_lifetime ( & mut self , lifetime : & hir:: Lifetime ) {
207
189
match ( self . tcx . named_region ( lifetime. hir_id ) , self . bound_region ) {
208
190
// the lifetime of the TyPath!
209
- (
210
- Some ( rl:: Region :: LateBoundAnon ( debruijn_index, _, anon_index) ) ,
211
- ty:: BrAnon ( br_index) ,
212
- ) => {
213
- if debruijn_index == self . current_index && anon_index == br_index {
214
- self . found_it = true ;
215
- return ;
216
- }
217
- }
218
-
219
191
( Some ( rl:: Region :: EarlyBound ( _, id) ) , ty:: BrNamed ( def_id, _) ) => {
220
192
debug ! ( "EarlyBound id={:?} def_id={:?}" , id, def_id) ;
221
193
if id == def_id {
@@ -239,7 +211,6 @@ impl<'tcx> Visitor<'tcx> for TyPathVisitor<'tcx> {
239
211
rl:: Region :: Static
240
212
| rl:: Region :: EarlyBound ( _, _)
241
213
| rl:: Region :: LateBound ( _, _, _)
242
- | rl:: Region :: LateBoundAnon ( _, _, _)
243
214
| rl:: Region :: Free ( _, _) ,
244
215
)
245
216
| None ,
0 commit comments