We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f7d7d7 commit 3a201f4Copy full SHA for 3a201f4
clippy_lints/src/copies.rs
@@ -253,7 +253,6 @@ fn bindings<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, pat: &Pat) -> HashMap<Interned
253
}
254
255
PatKind::Lit(..) |
256
- PatKind::QPath(..) |
257
PatKind::Range(..) |
258
PatKind::Wild |
259
PatKind::Path(..) => (),
clippy_lints/src/matches.rs
@@ -202,7 +202,7 @@ fn check_single_match_opt_like(cx: &LateContext, ex: &Expr, arms: &[Arm], expr:
202
path.to_string()
203
204
PatKind::Binding(BindByValue(MutImmutable), ident, None) => ident.node.to_string(),
205
- PatKind::Path(ref path) => path.to_string(),
+ PatKind::Path(None, ref path) => path.to_string(),
206
_ => return,
207
};
208
clippy_lints/src/utils/hir.rs
@@ -148,11 +148,10 @@ impl<'a, 'tcx: 'a> SpanlessEq<'a, 'tcx> {
148
(&PatKind::Binding(ref lb, ref li, ref lp), &PatKind::Binding(ref rb, ref ri, ref rp)) => {
149
lb == rb && li.node.as_str() == ri.node.as_str() && both(lp, rp, |l, r| self.eq_pat(l, r))
150
151
- (&PatKind::Path(ref l), &PatKind::Path(ref r)) => self.eq_path(l, r),
152
- (&PatKind::Lit(ref l), &PatKind::Lit(ref r)) => self.eq_expr(l, r),
153
- (&PatKind::QPath(ref ls, ref lp), &PatKind::QPath(ref rs, ref rp)) => {
154
- self.eq_qself(ls, rs) && self.eq_path(lp, rp)
+ (&PatKind::Path(ref ql, ref l), &PatKind::Path(ref qr, ref r)) => {
+ both(ql, qr, |ql, qr| self.eq_qself(ql, qr)) && self.eq_path(l, r)
155
+ (&PatKind::Lit(ref l), &PatKind::Lit(ref r)) => self.eq_expr(l, r),
156
(&PatKind::Tuple(ref l, ls), &PatKind::Tuple(ref r, rs)) => {
157
ls == rs && over(l, r, |l, r| self.eq_pat(l, r))
158
0 commit comments