summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/repeat_once.stderr
blob: 915eea3bfc6b8fbec2a4c74c55b4126602aaccab (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
error: calling `repeat(1)` on slice
  --> $DIR/repeat_once.rs:10:13
   |
LL |     let a = [1; 5].repeat(1);
   |             ^^^^^^^^^^^^^^^^ help: consider using `.to_vec()` instead: `[1; 5].to_vec()`
   |
   = note: `-D clippy::repeat-once` implied by `-D warnings`

error: calling `repeat(1)` on slice
  --> $DIR/repeat_once.rs:11:13
   |
LL |     let b = slice.repeat(1);
   |             ^^^^^^^^^^^^^^^ help: consider using `.to_vec()` instead: `slice.to_vec()`

error: calling `repeat(1)` on str
  --> $DIR/repeat_once.rs:12:13
   |
LL |     let c = "hello".repeat(N);
   |             ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()` instead: `"hello".to_string()`

error: calling `repeat(1)` on str
  --> $DIR/repeat_once.rs:13:13
   |
LL |     let d = "hi".repeat(1);
   |             ^^^^^^^^^^^^^^ help: consider using `.to_string()` instead: `"hi".to_string()`

error: calling `repeat(1)` on str
  --> $DIR/repeat_once.rs:14:13
   |
LL |     let e = s.repeat(1);
   |             ^^^^^^^^^^^ help: consider using `.to_string()` instead: `s.to_string()`

error: calling `repeat(1)` on a string literal
  --> $DIR/repeat_once.rs:15:13
   |
LL |     let f = string.repeat(1);
   |             ^^^^^^^^^^^^^^^^ help: consider using `.clone()` instead: `string.clone()`

error: aborting due to 6 previous errors