File tree 1 file changed +19
-2
lines changed
1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -2811,11 +2811,28 @@ impl<'a> LoweringContext<'a> {
2811
2811
struct IdVisitor { ids : SmallVector < hir:: ItemId > }
2812
2812
impl < ' a > Visitor < ' a > for IdVisitor {
2813
2813
fn visit_ty ( & mut self , ty : & ' a Ty ) {
2814
- if let TyKind :: ImplTrait ( id, _) = ty. node {
2815
- self . ids . push ( hir:: ItemId { id } ) ;
2814
+ match ty. node {
2815
+ | TyKind :: Typeof ( _)
2816
+ | TyKind :: BareFn ( _)
2817
+ => return ,
2818
+
2819
+ TyKind :: ImplTrait ( id, _) => self . ids . push ( hir:: ItemId { id } ) ,
2820
+ _ => { } ,
2816
2821
}
2817
2822
visit:: walk_ty ( self , ty) ;
2818
2823
}
2824
+ fn visit_path_segment (
2825
+ & mut self ,
2826
+ path_span : Span ,
2827
+ path_segment : & ' v PathSegment ,
2828
+ ) {
2829
+ if let Some ( ref p) = path_segment. parameters {
2830
+ if let PathParameters :: Parenthesized ( ..) = * * p {
2831
+ return ;
2832
+ }
2833
+ }
2834
+ visit:: walk_path_segment ( self , path_span, path_segment)
2835
+ }
2819
2836
}
2820
2837
let mut visitor = IdVisitor { ids : SmallVector :: one ( hir:: ItemId { id : i. id } ) } ;
2821
2838
match decl. output {
You can’t perform that action at this time.
0 commit comments