rust/tests/ui/redundant_clone.stderr
2024-06-25 17:50:48 +02:00

185 lines
5.1 KiB
Plaintext

error: redundant clone
--> tests/ui/redundant_clone.rs:14:42
|
LL | let _s = ["lorem", "ipsum"].join(" ").to_string();
| ^^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:14:14
|
LL | let _s = ["lorem", "ipsum"].join(" ").to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: `-D clippy::redundant-clone` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_clone)]`
error: redundant clone
--> tests/ui/redundant_clone.rs:17:15
|
LL | let _s = s.clone();
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:17:14
|
LL | let _s = s.clone();
| ^
error: redundant clone
--> tests/ui/redundant_clone.rs:20:15
|
LL | let _s = s.to_string();
| ^^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:20:14
|
LL | let _s = s.to_string();
| ^
error: redundant clone
--> tests/ui/redundant_clone.rs:23:15
|
LL | let _s = s.to_owned();
| ^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:23:14
|
LL | let _s = s.to_owned();
| ^
error: redundant clone
--> tests/ui/redundant_clone.rs:25:42
|
LL | let _s = Path::new("/a/b/").join("c").to_owned();
| ^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:25:14
|
LL | let _s = Path::new("/a/b/").join("c").to_owned();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: redundant clone
--> tests/ui/redundant_clone.rs:27:42
|
LL | let _s = Path::new("/a/b/").join("c").to_path_buf();
| ^^^^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:27:14
|
LL | let _s = Path::new("/a/b/").join("c").to_path_buf();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: redundant clone
--> tests/ui/redundant_clone.rs:29:29
|
LL | let _s = OsString::new().to_owned();
| ^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:29:14
|
LL | let _s = OsString::new().to_owned();
| ^^^^^^^^^^^^^^^
error: redundant clone
--> tests/ui/redundant_clone.rs:31:29
|
LL | let _s = OsString::new().to_os_string();
| ^^^^^^^^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:31:14
|
LL | let _s = OsString::new().to_os_string();
| ^^^^^^^^^^^^^^^
error: redundant clone
--> tests/ui/redundant_clone.rs:42:19
|
LL | let _t = tup.0.clone();
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:42:14
|
LL | let _t = tup.0.clone();
| ^^^^^
error: redundant clone
--> tests/ui/redundant_clone.rs:74:25
|
LL | if b { (a.clone(), a.clone()) } else { (Alpha, a) }
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:74:24
|
LL | if b { (a.clone(), a.clone()) } else { (Alpha, a) }
| ^
error: redundant clone
--> tests/ui/redundant_clone.rs:131:15
|
LL | let _s = s.clone();
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:131:14
|
LL | let _s = s.clone();
| ^
error: redundant clone
--> tests/ui/redundant_clone.rs:132:15
|
LL | let _t = t.clone();
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:132:14
|
LL | let _t = t.clone();
| ^
error: redundant clone
--> tests/ui/redundant_clone.rs:142:19
|
LL | let _f = f.clone();
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:142:18
|
LL | let _f = f.clone();
| ^
error: redundant clone
--> tests/ui/redundant_clone.rs:154:14
|
LL | let y = x.clone().join("matthias");
| ^^^^^^^^ help: remove this
|
note: cloned value is neither consumed nor mutated
--> tests/ui/redundant_clone.rs:154:13
|
LL | let y = x.clone().join("matthias");
| ^^^^^^^^^
error: redundant clone
--> tests/ui/redundant_clone.rs:208:11
|
LL | foo(&x.clone(), move || {
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> tests/ui/redundant_clone.rs:208:10
|
LL | foo(&x.clone(), move || {
| ^
error: aborting due to 15 previous errors