2021-06-03 06:41:37 +00:00
|
|
|
error: manual implementation of `str::repeat` using iterators
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_str_repeat.rs:8:21
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
|
LL | let _: String = std::iter::repeat("test").take(10).collect();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"test".repeat(10)`
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-str-repeat` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::manual_str_repeat)]`
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
error: manual implementation of `str::repeat` using iterators
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_str_repeat.rs:9:21
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
|
LL | let _: String = std::iter::repeat('x').take(10).collect();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"x".repeat(10)`
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
error: manual implementation of `str::repeat` using iterators
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_str_repeat.rs:10:21
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | let _: String = std::iter::repeat('\'').take(10).collect();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"'".repeat(10)`
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
error: manual implementation of `str::repeat` using iterators
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_str_repeat.rs:11:21
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
|
LL | let _: String = std::iter::repeat('"').take(10).collect();
|
2023-08-24 19:32:12 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"\"".repeat(10)`
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
error: manual implementation of `str::repeat` using iterators
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_str_repeat.rs:15:13
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
|
LL | let _ = repeat(x).take(count + 2).collect::<String>();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.repeat(count + 2)`
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
error: manual implementation of `str::repeat` using iterators
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_str_repeat.rs:24:21
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
|
LL | let _: String = repeat(*x).take(count).collect();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*x).repeat(count)`
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
error: manual implementation of `str::repeat` using iterators
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_str_repeat.rs:33:21
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
|
LL | let _: String = repeat(x).take(count).collect();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.repeat(count)`
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
error: manual implementation of `str::repeat` using iterators
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_str_repeat.rs:45:21
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
|
LL | let _: String = repeat(Cow::Borrowed("test")).take(count).collect();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Cow::Borrowed("test").repeat(count)`
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
error: manual implementation of `str::repeat` using iterators
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_str_repeat.rs:48:21
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
|
LL | let _: String = repeat(x).take(count).collect();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.repeat(count)`
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
error: manual implementation of `str::repeat` using iterators
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/manual_str_repeat.rs:63:21
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
|
LL | let _: String = std::iter::repeat("test").take(10).collect();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"test".repeat(10)`
|
2021-06-03 06:41:37 +00:00
|
|
|
|
|
|
|
error: aborting due to 10 previous errors
|
|
|
|
|