@@ -165,20 +165,6 @@ where
165
165
}
166
166
}
167
167
168
- fn visit_abstract_const_expr (
169
- & mut self ,
170
- tcx : TyCtxt < ' tcx > ,
171
- ct : AbstractConst < ' tcx > ,
172
- ) -> ControlFlow < V :: BreakTy > {
173
- walk_abstract_const ( tcx, ct, |node| match node. root ( tcx) {
174
- ACNode :: Leaf ( leaf) => self . visit_const ( leaf) ,
175
- ACNode :: Cast ( _, _, ty) => self . visit_ty ( ty) ,
176
- ACNode :: Binop ( ..) | ACNode :: UnaryOp ( ..) | ACNode :: FunctionCall ( _, _) => {
177
- ControlFlow :: CONTINUE
178
- }
179
- } )
180
- }
181
-
182
168
fn visit_predicates (
183
169
& mut self ,
184
170
predicates : ty:: GenericPredicates < ' tcx > ,
@@ -301,9 +287,16 @@ where
301
287
self . visit_ty ( c. ty ( ) ) ?;
302
288
let tcx = self . def_id_visitor . tcx ( ) ;
303
289
if let Ok ( Some ( ct) ) = AbstractConst :: from_const ( tcx, c) {
304
- self . visit_abstract_const_expr ( tcx, ct) ?;
290
+ walk_abstract_const ( tcx, ct, |node| match node. root ( tcx) {
291
+ ACNode :: Leaf ( leaf) => self . visit_const ( leaf) ,
292
+ ACNode :: Cast ( _, _, ty) => self . visit_ty ( ty) ,
293
+ ACNode :: Binop ( ..) | ACNode :: UnaryOp ( ..) | ACNode :: FunctionCall ( _, _) => {
294
+ ControlFlow :: CONTINUE
295
+ }
296
+ } )
297
+ } else {
298
+ ControlFlow :: CONTINUE
305
299
}
306
- ControlFlow :: CONTINUE
307
300
}
308
301
}
309
302
0 commit comments