summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/author/repeat.stdout
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/author/repeat.stdout')
-rw-r--r--src/tools/clippy/tests/ui/author/repeat.stdout12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/author/repeat.stdout b/src/tools/clippy/tests/ui/author/repeat.stdout
new file mode 100644
index 000000000..471bbce4f
--- /dev/null
+++ b/src/tools/clippy/tests/ui/author/repeat.stdout
@@ -0,0 +1,12 @@
+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;
+ 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 {
+ // report your lint here
+ }
+}