]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/manual_str_repeat.stderr
Merge commit 'a98e7ab8b94485be6bd03e0c6b8682ecab5b52e6' into clippyup
[rust.git] / src / tools / clippy / tests / ui / manual_str_repeat.stderr
1 error: manual implementation of `str::repeat` using iterators
2   --> $DIR/manual_str_repeat.rs:10:21
3    |
4 LL |     let _: String = std::iter::repeat("test").take(10).collect();
5    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"test".repeat(10)`
6    |
7    = note: `-D clippy::manual-str-repeat` implied by `-D warnings`
8
9 error: manual implementation of `str::repeat` using iterators
10   --> $DIR/manual_str_repeat.rs:11:21
11    |
12 LL |     let _: String = std::iter::repeat('x').take(10).collect();
13    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"x".repeat(10)`
14
15 error: manual implementation of `str::repeat` using iterators
16   --> $DIR/manual_str_repeat.rs:12:21
17    |
18 LL |     let _: String = std::iter::repeat('/'').take(10).collect();
19    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"'".repeat(10)`
20
21 error: manual implementation of `str::repeat` using iterators
22   --> $DIR/manual_str_repeat.rs:13:21
23    |
24 LL |     let _: String = std::iter::repeat('"').take(10).collect();
25    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"/"".repeat(10)`
26
27 error: manual implementation of `str::repeat` using iterators
28   --> $DIR/manual_str_repeat.rs:17:13
29    |
30 LL |     let _ = repeat(x).take(count + 2).collect::<String>();
31    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `x.repeat(count + 2)`
32
33 error: manual implementation of `str::repeat` using iterators
34   --> $DIR/manual_str_repeat.rs:26:21
35    |
36 LL |     let _: String = repeat(*x).take(count).collect();
37    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `(*x).repeat(count)`
38
39 error: manual implementation of `str::repeat` using iterators
40   --> $DIR/manual_str_repeat.rs:35:21
41    |
42 LL |     let _: String = repeat(x).take(count).collect();
43    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `x.repeat(count)`
44
45 error: manual implementation of `str::repeat` using iterators
46   --> $DIR/manual_str_repeat.rs:47:21
47    |
48 LL |     let _: String = repeat(Cow::Borrowed("test")).take(count).collect();
49    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `Cow::Borrowed("test").repeat(count)`
50
51 error: manual implementation of `str::repeat` using iterators
52   --> $DIR/manual_str_repeat.rs:50:21
53    |
54 LL |     let _: String = repeat(x).take(count).collect();
55    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `x.repeat(count)`
56
57 error: manual implementation of `str::repeat` using iterators
58   --> $DIR/manual_str_repeat.rs:65:21
59    |
60 LL |     let _: String = std::iter::repeat("test").take(10).collect();
61    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"test".repeat(10)`
62
63 error: aborting due to 10 previous errors
64