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:
Michael Goulet 2023-12-26 13:29:13 -05:00 committed by GitHub
commit 2230add36e
2 changed files with 4 additions and 0 deletions

View file

@ -12,6 +12,7 @@ if let StmtKind::Local(local) = stmt.kind
&& args.len() == 1 && args.len() == 1
&& let ExprKind::Call(func1, args1) = args[0].kind && let ExprKind::Call(func1, args1) = args[0].kind
&& let ExprKind::Path(ref qpath1) = func1.kind && let ExprKind::Path(ref qpath1) = func1.kind
&& match_qpath(qpath1, &["format_arguments", "new_v1"])
&& args1.len() == 2 && args1.len() == 2
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind
&& let ExprKind::Array(elements) = inner.kind && let ExprKind::Array(elements) = inner.kind
@ -27,6 +28,7 @@ if let StmtKind::Local(local) = stmt.kind
&& elements1.len() == 1 && elements1.len() == 1
&& let ExprKind::Call(func2, args2) = elements1[0].kind && let ExprKind::Call(func2, args2) = elements1[0].kind
&& let ExprKind::Path(ref qpath2) = func2.kind && let ExprKind::Path(ref qpath2) = func2.kind
&& match_qpath(qpath2, &["format_argument", "new_display"])
&& args2.len() == 1 && args2.len() == 1
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[0].kind && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[0].kind
&& let ExprKind::Path(ref qpath3) = inner2.kind && let ExprKind::Path(ref qpath3) = inner2.kind

View file

@ -22,6 +22,7 @@ if let Some(higher::ForLoop { pat: pat, arg: arg, body: body, .. }) = higher::Fo
&& args.len() == 1 && args.len() == 1
&& let ExprKind::Call(func1, args1) = args[0].kind && let ExprKind::Call(func1, args1) = args[0].kind
&& let ExprKind::Path(ref qpath2) = func1.kind && let ExprKind::Path(ref qpath2) = func1.kind
&& match_qpath(qpath2, &["format_arguments", "new_v1"])
&& args1.len() == 2 && args1.len() == 2
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind
&& let ExprKind::Array(elements) = inner.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 && elements1.len() == 1
&& let ExprKind::Call(func2, args2) = elements1[0].kind && let ExprKind::Call(func2, args2) = elements1[0].kind
&& let ExprKind::Path(ref qpath3) = func2.kind && let ExprKind::Path(ref qpath3) = func2.kind
&& match_qpath(qpath3, &["format_argument", "new_display"])
&& args2.len() == 1 && args2.len() == 1
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[0].kind && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[0].kind
&& let ExprKind::Path(ref qpath4) = inner2.kind && let ExprKind::Path(ref qpath4) = inner2.kind