File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -2797,11 +2797,28 @@ impl<'a> LoweringContext<'a> {
2797
2797
struct IdVisitor { ids : SmallVector < hir:: ItemId > }
2798
2798
impl < ' a > Visitor < ' a > for IdVisitor {
2799
2799
fn visit_ty ( & mut self , ty : & ' a Ty ) {
2800
- if let TyKind :: ImplTrait ( id, _) = ty. node {
2801
- self . ids . push ( hir:: ItemId { id } ) ;
2800
+ match ty. node {
2801
+ | TyKind :: Typeof ( _)
2802
+ | TyKind :: BareFn ( _)
2803
+ => return ,
2804
+
2805
+ TyKind :: ImplTrait ( id, _) => self . ids . push ( hir:: ItemId { id } ) ,
2806
+ _ => { } ,
2802
2807
}
2803
2808
visit:: walk_ty ( self , ty) ;
2804
2809
}
2810
+ fn visit_path_segment (
2811
+ & mut self ,
2812
+ path_span : Span ,
2813
+ path_segment : & ' v PathSegment ,
2814
+ ) {
2815
+ if let Some ( ref p) = path_segment. parameters {
2816
+ if let PathParameters :: Parenthesized ( ..) = * * p {
2817
+ return ;
2818
+ }
2819
+ }
2820
+ visit:: walk_path_segment ( self , path_span, path_segment)
2821
+ }
2805
2822
}
2806
2823
let mut visitor = IdVisitor { ids : SmallVector :: one ( hir:: ItemId { id : i. id } ) } ;
2807
2824
match decl. output {
You can’t perform that action at this time.
0 commit comments