diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-04 21:23:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-04 21:23:06 +0100 |
| commit | ac7a8677155b911c27ee28f2f0d1a359686fa774 (patch) | |
| tree | 597cb35450fbc6fc014ca4ac8a51a3aef08d9153 /src/tools/clippy/tests/ui | |
| parent | d49c692eeba97381570f0a0f3167b4c44c80bc0a (diff) | |
| parent | a02bf76c9667ad7a25df3b672b3748398451a3d0 (diff) | |
| download | rust-ac7a8677155b911c27ee28f2f0d1a359686fa774.tar.gz rust-ac7a8677155b911c27ee28f2f0d1a359686fa774.zip | |
Rollup merge of #91907 - lcnr:const-arg-infer, r=BoxyUwU
Allow `_` as the length of array types and repeat expressions r? `@BoxyUwU` cc `@varkor`
Diffstat (limited to 'src/tools/clippy/tests/ui')
| -rw-r--r-- | src/tools/clippy/tests/ui/author/repeat.stdout | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/clippy/tests/ui/author/repeat.stdout b/src/tools/clippy/tests/ui/author/repeat.stdout index f16350e4b5e..471bbce4f41 100644 --- a/src/tools/clippy/tests/ui/author/repeat.stdout +++ b/src/tools/clippy/tests/ui/author/repeat.stdout @@ -2,7 +2,8 @@ if_chain! { if let ExprKind::Repeat(value, length) = expr.kind; if let ExprKind::Lit(ref lit) = value.kind; if let LitKind::Int(1, LitIntType::Unsigned(UintTy::U8)) = lit.node; - let expr1 = &cx.tcx.hir().body(length.body).value; + if let ArrayLen::Body(anon_const) = length; + let expr1 = &cx.tcx.hir().body(anon_const.body).value; if let ExprKind::Lit(ref lit1) = expr1.kind; if let LitKind::Int(5, LitIntType::Unsuffixed) = lit1.node; then { |
