2018-10-23 07:01:45 +00:00
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:14:42
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = ["lorem", "ipsum"].join(" ").to_string();
|
|
|
|
| ^^^^^^^^^^^^ help: remove this
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:14:14
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = ["lorem", "ipsum"].join(" ").to_string();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::redundant-clone` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::redundant_clone)]`
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:17:15
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = s.clone();
|
|
|
|
| ^^^^^^^^ help: remove this
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:17:14
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = s.clone();
|
|
|
|
| ^
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:20:15
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = s.to_string();
|
|
|
|
| ^^^^^^^^^^^^ help: remove this
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:20:14
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = s.to_string();
|
|
|
|
| ^
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:23:15
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = s.to_owned();
|
|
|
|
| ^^^^^^^^^^^ help: remove this
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:23:14
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = s.to_owned();
|
|
|
|
| ^
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:25:42
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = Path::new("/a/b/").join("c").to_owned();
|
|
|
|
| ^^^^^^^^^^^ help: remove this
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:25:14
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = Path::new("/a/b/").join("c").to_owned();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-10-23 07:01:45 +00:00
|
|
|
|
2020-01-08 04:59:58 +00:00
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:27:42
|
2020-01-08 04:59:58 +00:00
|
|
|
|
|
|
|
|
LL | let _s = Path::new("/a/b/").join("c").to_path_buf();
|
|
|
|
| ^^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:27:14
|
2020-01-08 04:59:58 +00:00
|
|
|
|
|
|
|
|
LL | let _s = Path::new("/a/b/").join("c").to_path_buf();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2018-10-23 07:01:45 +00:00
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:29:29
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = OsString::new().to_owned();
|
|
|
|
| ^^^^^^^^^^^ help: remove this
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:29:14
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = OsString::new().to_owned();
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2018-10-23 07:01:45 +00:00
|
|
|
|
2020-01-08 04:59:58 +00:00
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:31:29
|
2020-01-08 04:59:58 +00:00
|
|
|
|
|
|
|
|
LL | let _s = OsString::new().to_os_string();
|
|
|
|
| ^^^^^^^^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:31:14
|
2020-01-08 04:59:58 +00:00
|
|
|
|
|
|
|
|
LL | let _s = OsString::new().to_os_string();
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
2018-10-23 07:01:45 +00:00
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:42:19
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _t = tup.0.clone();
|
|
|
|
| ^^^^^^^^ help: remove this
|
2018-12-09 11:19:21 +00:00
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:42:14
|
2018-12-09 11:19:21 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _t = tup.0.clone();
|
|
|
|
| ^^^^^
|
2018-12-09 11:19:21 +00:00
|
|
|
|
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:74:25
|
2018-12-09 11:19:21 +00:00
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
LL | if b { (a.clone(), a.clone()) } else { (Alpha, a) }
|
|
|
|
| ^^^^^^^^ help: remove this
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:74:24
|
2018-10-23 07:01:45 +00:00
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
LL | if b { (a.clone(), a.clone()) } else { (Alpha, a) }
|
|
|
|
| ^
|
2018-10-23 07:01:45 +00:00
|
|
|
|
2019-09-16 15:50:15 +00:00
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:131:15
|
2019-09-16 15:50:15 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = s.clone();
|
|
|
|
| ^^^^^^^^ help: remove this
|
2019-09-16 15:50:15 +00:00
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:131:14
|
2019-09-16 15:50:15 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _s = s.clone();
|
|
|
|
| ^
|
2019-09-16 15:50:15 +00:00
|
|
|
|
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:132:15
|
2019-09-16 15:50:15 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _t = t.clone();
|
|
|
|
| ^^^^^^^^ help: remove this
|
2019-09-16 15:50:15 +00:00
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:132:14
|
2019-09-16 15:50:15 +00:00
|
|
|
|
|
2019-09-10 02:56:34 +00:00
|
|
|
LL | let _t = t.clone();
|
|
|
|
| ^
|
2019-09-16 15:50:15 +00:00
|
|
|
|
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:142:19
|
2019-09-16 15:50:15 +00:00
|
|
|
|
|
|
|
|
LL | let _f = f.clone();
|
|
|
|
| ^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:142:18
|
2019-09-16 15:50:15 +00:00
|
|
|
|
|
|
|
|
LL | let _f = f.clone();
|
|
|
|
| ^
|
|
|
|
|
2020-03-12 15:31:09 +00:00
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:154:14
|
2020-03-12 15:31:09 +00:00
|
|
|
|
|
|
|
|
LL | let y = x.clone().join("matthias");
|
|
|
|
| ^^^^^^^^ help: remove this
|
|
|
|
|
|
2020-03-12 16:25:18 +00:00
|
|
|
note: cloned value is neither consumed nor mutated
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:154:13
|
2020-03-12 15:31:09 +00:00
|
|
|
|
|
|
|
|
LL | let y = x.clone().join("matthias");
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
2021-11-04 12:52:36 +00:00
|
|
|
error: redundant clone
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:208:11
|
2021-11-04 12:52:36 +00:00
|
|
|
|
|
|
|
|
LL | foo(&x.clone(), move || {
|
|
|
|
| ^^^^^^^^ help: remove this
|
|
|
|
|
|
|
|
|
note: this value is dropped without further use
|
2024-02-10 22:31:36 +00:00
|
|
|
--> tests/ui/redundant_clone.rs:208:10
|
2021-11-04 12:52:36 +00:00
|
|
|
|
|
|
|
|
LL | foo(&x.clone(), move || {
|
|
|
|
| ^
|
|
|
|
|
2023-01-12 18:48:13 +00:00
|
|
|
error: aborting due to 15 previous errors
|
2018-10-23 07:01:45 +00:00
|
|
|
|