]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/repeat_once.stderr
Rollup merge of #102625 - Rageking8:fix-backtrace-small-typo, r=m-ou-se
[rust.git] / src / tools / clippy / tests / ui / repeat_once.stderr
1 error: calling `repeat(1)` on slice
2   --> $DIR/repeat_once.rs:10:13
3    |
4 LL |     let a = [1; 5].repeat(1);
5    |             ^^^^^^^^^^^^^^^^ help: consider using `.to_vec()` instead: `[1; 5].to_vec()`
6    |
7    = note: `-D clippy::repeat-once` implied by `-D warnings`
8
9 error: calling `repeat(1)` on slice
10   --> $DIR/repeat_once.rs:11:13
11    |
12 LL |     let b = slice.repeat(1);
13    |             ^^^^^^^^^^^^^^^ help: consider using `.to_vec()` instead: `slice.to_vec()`
14
15 error: calling `repeat(1)` on str
16   --> $DIR/repeat_once.rs:12:13
17    |
18 LL |     let c = "hello".repeat(N);
19    |             ^^^^^^^^^^^^^^^^^ help: consider using `.to_string()` instead: `"hello".to_string()`
20
21 error: calling `repeat(1)` on str
22   --> $DIR/repeat_once.rs:13:13
23    |
24 LL |     let d = "hi".repeat(1);
25    |             ^^^^^^^^^^^^^^ help: consider using `.to_string()` instead: `"hi".to_string()`
26
27 error: calling `repeat(1)` on str
28   --> $DIR/repeat_once.rs:14:13
29    |
30 LL |     let e = s.repeat(1);
31    |             ^^^^^^^^^^^ help: consider using `.to_string()` instead: `s.to_string()`
32
33 error: calling `repeat(1)` on a string literal
34   --> $DIR/repeat_once.rs:15:13
35    |
36 LL |     let f = string.repeat(1);
37    |             ^^^^^^^^^^^^^^^^ help: consider using `.clone()` instead: `string.clone()`
38
39 error: aborting due to 6 previous errors
40