rust/tests/ui/redundant_clone.stderr

172 lines
4.6 KiB
Text
Raw Normal View History

2018-10-23 09:01:45 +02:00
error: redundant clone
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:9:42
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _s = ["lorem", "ipsum"].join(" ").to_string();
| ^^^^^^^^^^^^ help: remove this
2018-10-23 09:01:45 +02:00
|
= note: `-D clippy::redundant-clone` implied by `-D warnings`
note: this value is dropped without further use
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:9:14
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _s = ["lorem", "ipsum"].join(" ").to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-10-23 09:01:45 +02:00
error: redundant clone
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:12:15
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _s = s.clone();
| ^^^^^^^^ help: remove this
2018-10-23 09:01:45 +02:00
|
note: this value is dropped without further use
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:12:14
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _s = s.clone();
| ^
2018-10-23 09:01:45 +02:00
error: redundant clone
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:15:15
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _s = s.to_string();
| ^^^^^^^^^^^^ help: remove this
2018-10-23 09:01:45 +02:00
|
note: this value is dropped without further use
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:15:14
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _s = s.to_string();
| ^
2018-10-23 09:01:45 +02:00
error: redundant clone
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:18:15
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _s = s.to_owned();
| ^^^^^^^^^^^ help: remove this
2018-10-23 09:01:45 +02:00
|
note: this value is dropped without further use
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:18:14
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _s = s.to_owned();
| ^
2018-10-23 09:01:45 +02:00
error: redundant clone
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:20:42
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _s = Path::new("/a/b/").join("c").to_owned();
| ^^^^^^^^^^^ help: remove this
2018-10-23 09:01:45 +02:00
|
note: this value is dropped without further use
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:20:14
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _s = Path::new("/a/b/").join("c").to_owned();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-10-23 09:01:45 +02:00
2020-01-08 05:59:58 +01:00
error: redundant clone
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:22:42
2020-01-08 05:59:58 +01:00
|
LL | let _s = Path::new("/a/b/").join("c").to_path_buf();
| ^^^^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:22:14
2020-01-08 05:59:58 +01:00
|
LL | let _s = Path::new("/a/b/").join("c").to_path_buf();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-10-23 09:01:45 +02:00
error: redundant clone
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:24:29
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _s = OsString::new().to_owned();
| ^^^^^^^^^^^ help: remove this
2018-10-23 09:01:45 +02:00
|
note: this value is dropped without further use
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:24:14
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _s = OsString::new().to_owned();
| ^^^^^^^^^^^^^^^
2018-10-23 09:01:45 +02:00
2020-01-08 05:59:58 +01:00
error: redundant clone
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:26:29
2020-01-08 05:59:58 +01:00
|
LL | let _s = OsString::new().to_os_string();
| ^^^^^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:26:14
2020-01-08 05:59:58 +01:00
|
LL | let _s = OsString::new().to_os_string();
| ^^^^^^^^^^^^^^^
2018-10-23 09:01:45 +02:00
error: redundant clone
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:33:19
2018-10-23 09:01:45 +02:00
|
2019-09-10 04:56:34 +02:00
LL | let _t = tup.0.clone();
| ^^^^^^^^ help: remove this
2018-12-09 12:19:21 +01:00
|
note: this value is dropped without further use
2021-02-12 05:27:04 +01:00
--> $DIR/redundant_clone.rs:33:14
2018-12-09 12:19:21 +01:00
|
2019-09-10 04:56:34 +02:00
LL | let _t = tup.0.clone();
| ^^^^^
2018-12-09 12:19:21 +01:00
error: redundant clone
2021-06-11 14:57:11 +02:00
--> $DIR/redundant_clone.rs:65:25
2018-12-09 12:19:21 +01:00
|
LL | if b { (a.clone(), a.clone()) } else { (Alpha, a) }
| ^^^^^^^^ help: remove this
2018-10-23 09:01:45 +02:00
|
note: this value is dropped without further use
2021-06-11 14:57:11 +02:00
--> $DIR/redundant_clone.rs:65:24
2018-10-23 09:01:45 +02:00
|
LL | if b { (a.clone(), a.clone()) } else { (Alpha, a) }
| ^
2018-10-23 09:01:45 +02:00
error: redundant clone
2021-06-11 14:57:11 +02:00
--> $DIR/redundant_clone.rs:122:15
|
2019-09-10 04:56:34 +02:00
LL | let _s = s.clone();
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
2021-06-11 14:57:11 +02:00
--> $DIR/redundant_clone.rs:122:14
|
2019-09-10 04:56:34 +02:00
LL | let _s = s.clone();
| ^
error: redundant clone
2021-06-11 14:57:11 +02:00
--> $DIR/redundant_clone.rs:123:15
|
2019-09-10 04:56:34 +02:00
LL | let _t = t.clone();
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
2021-06-11 14:57:11 +02:00
--> $DIR/redundant_clone.rs:123:14
|
2019-09-10 04:56:34 +02:00
LL | let _t = t.clone();
| ^
error: redundant clone
2021-06-11 14:57:11 +02:00
--> $DIR/redundant_clone.rs:133:19
|
LL | let _f = f.clone();
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
2021-06-11 14:57:11 +02:00
--> $DIR/redundant_clone.rs:133:18
|
LL | let _f = f.clone();
| ^
error: redundant clone
2021-06-11 14:57:11 +02:00
--> $DIR/redundant_clone.rs:145:14
|
LL | let y = x.clone().join("matthias");
| ^^^^^^^^ help: remove this
|
2020-03-12 17:25:18 +01:00
note: cloned value is neither consumed nor mutated
2021-06-11 14:57:11 +02:00
--> $DIR/redundant_clone.rs:145:13
|
LL | let y = x.clone().join("matthias");
| ^^^^^^^^^
error: aborting due to 14 previous errors
2018-10-23 09:01:45 +02:00