File tree Expand file tree Collapse file tree 1 file changed +5
-21
lines changed Expand file tree Collapse file tree 1 file changed +5
-21
lines changed Original file line number Diff line number Diff line change @@ -170,27 +170,11 @@ impl<'tcx> LateLintPass<'tcx> for TyTyKind {
170170 | PatKind :: TupleStruct ( qpath, ..)
171171 | PatKind :: Struct ( qpath, ..) ,
172172 ..
173- } ) => {
174- if let QPath :: TypeRelative ( qpath_ty, ..) = qpath
175- && qpath_ty. hir_id == ty. hir_id
176- {
177- Some ( path. span )
178- } else {
179- None
180- }
181- }
182- Node :: Expr ( Expr { kind : ExprKind :: Path ( qpath) , .. } ) => {
183- if let QPath :: TypeRelative ( qpath_ty, ..) = qpath
184- && qpath_ty. hir_id == ty. hir_id
185- {
186- Some ( path. span )
187- } else {
188- None
189- }
190- }
191- // Can't unify these two branches because qpath below is `&&` and above is `&`
192- // and `A | B` paths don't play well together with adjustments, apparently.
193- Node :: Expr ( Expr { kind : ExprKind :: Struct ( qpath, ..) , .. } ) => {
173+ } )
174+ | Node :: Expr (
175+ Expr { kind : ExprKind :: Path ( qpath) , .. }
176+ | & Expr { kind : ExprKind :: Struct ( qpath, ..) , .. } ,
177+ ) => {
194178 if let QPath :: TypeRelative ( qpath_ty, ..) = qpath
195179 && qpath_ty. hir_id == ty. hir_id
196180 {
You can’t perform that action at this time.
0 commit comments