mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
Rollup merge of #119240 - compiler-errors:lang-item-more, r=petrochenkov
Make some non-diagnostic-affecting `QPath::LangItem` into regular `QPath`s The rest of 'em affect diagnostics, so leave them alone... for now. cc #115178
This commit is contained in:
commit
2230add36e
2 changed files with 4 additions and 0 deletions
|
@ -12,6 +12,7 @@ if let StmtKind::Local(local) = stmt.kind
|
|||
&& args.len() == 1
|
||||
&& let ExprKind::Call(func1, args1) = args[0].kind
|
||||
&& let ExprKind::Path(ref qpath1) = func1.kind
|
||||
&& match_qpath(qpath1, &["format_arguments", "new_v1"])
|
||||
&& args1.len() == 2
|
||||
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind
|
||||
&& let ExprKind::Array(elements) = inner.kind
|
||||
|
@ -27,6 +28,7 @@ if let StmtKind::Local(local) = stmt.kind
|
|||
&& elements1.len() == 1
|
||||
&& let ExprKind::Call(func2, args2) = elements1[0].kind
|
||||
&& let ExprKind::Path(ref qpath2) = func2.kind
|
||||
&& match_qpath(qpath2, &["format_argument", "new_display"])
|
||||
&& args2.len() == 1
|
||||
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[0].kind
|
||||
&& let ExprKind::Path(ref qpath3) = inner2.kind
|
||||
|
|
|
@ -22,6 +22,7 @@ if let Some(higher::ForLoop { pat: pat, arg: arg, body: body, .. }) = higher::Fo
|
|||
&& args.len() == 1
|
||||
&& let ExprKind::Call(func1, args1) = args[0].kind
|
||||
&& let ExprKind::Path(ref qpath2) = func1.kind
|
||||
&& match_qpath(qpath2, &["format_arguments", "new_v1"])
|
||||
&& args1.len() == 2
|
||||
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind
|
||||
&& let ExprKind::Array(elements) = inner.kind
|
||||
|
@ -37,6 +38,7 @@ if let Some(higher::ForLoop { pat: pat, arg: arg, body: body, .. }) = higher::Fo
|
|||
&& elements1.len() == 1
|
||||
&& let ExprKind::Call(func2, args2) = elements1[0].kind
|
||||
&& let ExprKind::Path(ref qpath3) = func2.kind
|
||||
&& match_qpath(qpath3, &["format_argument", "new_display"])
|
||||
&& args2.len() == 1
|
||||
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[0].kind
|
||||
&& let ExprKind::Path(ref qpath4) = inner2.kind
|
||||
|
|
Loading…
Reference in a new issue