Skip to content

Commit 2230add

Browse files
Rollup merge of rust-lang#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 rust-lang#115178
2 parents 91859ed + 90a59d4 commit 2230add

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/ui/author/macro_in_closure.stdout

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ if let StmtKind::Local(local) = stmt.kind
1212
&& args.len() == 1
1313
&& let ExprKind::Call(func1, args1) = args[0].kind
1414
&& let ExprKind::Path(ref qpath1) = func1.kind
15+
&& match_qpath(qpath1, &["format_arguments", "new_v1"])
1516
&& args1.len() == 2
1617
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind
1718
&& let ExprKind::Array(elements) = inner.kind
@@ -27,6 +28,7 @@ if let StmtKind::Local(local) = stmt.kind
2728
&& elements1.len() == 1
2829
&& let ExprKind::Call(func2, args2) = elements1[0].kind
2930
&& let ExprKind::Path(ref qpath2) = func2.kind
31+
&& match_qpath(qpath2, &["format_argument", "new_display"])
3032
&& args2.len() == 1
3133
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[0].kind
3234
&& let ExprKind::Path(ref qpath3) = inner2.kind

tests/ui/author/macro_in_loop.stdout

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ if let Some(higher::ForLoop { pat: pat, arg: arg, body: body, .. }) = higher::Fo
2222
&& args.len() == 1
2323
&& let ExprKind::Call(func1, args1) = args[0].kind
2424
&& let ExprKind::Path(ref qpath2) = func1.kind
25+
&& match_qpath(qpath2, &["format_arguments", "new_v1"])
2526
&& args1.len() == 2
2627
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = args1[0].kind
2728
&& let ExprKind::Array(elements) = inner.kind
@@ -37,6 +38,7 @@ if let Some(higher::ForLoop { pat: pat, arg: arg, body: body, .. }) = higher::Fo
3738
&& elements1.len() == 1
3839
&& let ExprKind::Call(func2, args2) = elements1[0].kind
3940
&& let ExprKind::Path(ref qpath3) = func2.kind
41+
&& match_qpath(qpath3, &["format_argument", "new_display"])
4042
&& args2.len() == 1
4143
&& let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[0].kind
4244
&& let ExprKind::Path(ref qpath4) = inner2.kind

0 commit comments

Comments
 (0)