summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/manual_str_repeat.stderr
blob: 9a13aa972273730e8c7cfc8ab35b0a1defa18887 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
error: manual implementation of `str::repeat` using iterators
  --> $DIR/manual_str_repeat.rs:7:21
   |
LL |     let _: String = std::iter::repeat("test").take(10).collect();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"test".repeat(10)`
   |
   = note: `-D clippy::manual-str-repeat` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::manual_str_repeat)]`

error: manual implementation of `str::repeat` using iterators
  --> $DIR/manual_str_repeat.rs:8:21
   |
LL |     let _: String = std::iter::repeat('x').take(10).collect();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"x".repeat(10)`

error: manual implementation of `str::repeat` using iterators
  --> $DIR/manual_str_repeat.rs:9:21
   |
LL |     let _: String = std::iter::repeat('\'').take(10).collect();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"'".repeat(10)`

error: manual implementation of `str::repeat` using iterators
  --> $DIR/manual_str_repeat.rs:10:21
   |
LL |     let _: String = std::iter::repeat('"').take(10).collect();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"\"".repeat(10)`

error: manual implementation of `str::repeat` using iterators
  --> $DIR/manual_str_repeat.rs:14:13
   |
LL |     let _ = repeat(x).take(count + 2).collect::<String>();
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.repeat(count + 2)`

error: manual implementation of `str::repeat` using iterators
  --> $DIR/manual_str_repeat.rs:23:21
   |
LL |     let _: String = repeat(*x).take(count).collect();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*x).repeat(count)`

error: manual implementation of `str::repeat` using iterators
  --> $DIR/manual_str_repeat.rs:32:21
   |
LL |     let _: String = repeat(x).take(count).collect();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.repeat(count)`

error: manual implementation of `str::repeat` using iterators
  --> $DIR/manual_str_repeat.rs:44:21
   |
LL |     let _: String = repeat(Cow::Borrowed("test")).take(count).collect();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Cow::Borrowed("test").repeat(count)`

error: manual implementation of `str::repeat` using iterators
  --> $DIR/manual_str_repeat.rs:47:21
   |
LL |     let _: String = repeat(x).take(count).collect();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.repeat(count)`

error: manual implementation of `str::repeat` using iterators
  --> $DIR/manual_str_repeat.rs:62:21
   |
LL |     let _: String = std::iter::repeat("test").take(10).collect();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"test".repeat(10)`

error: aborting due to 10 previous errors