rust-clippy/tests/ui/implicit_clone.stderr
2021-02-26 19:13:47 -06:00

64 lines
2.3 KiB
Text

error: implicitly cloning a `Vec` by calling `to_owned` on its dereferenced type
--> $DIR/implicit_clone.rs:65:17
|
LL | let _ = vec.to_owned();
| ^^^^^^^^ help: consider using: `clone`
|
= note: `-D clippy::implicit-clone` implied by `-D warnings`
error: implicitly cloning a `Vec` by calling `to_vec` on its dereferenced type
--> $DIR/implicit_clone.rs:66:17
|
LL | let _ = vec.to_vec();
| ^^^^^^ help: consider using: `clone`
error: implicitly cloning a `Vec` by calling `to_owned` on its dereferenced type
--> $DIR/implicit_clone.rs:70:21
|
LL | let _ = vec_ref.to_owned();
| ^^^^^^^^ help: consider using: `clone`
error: implicitly cloning a `Vec` by calling `to_vec` on its dereferenced type
--> $DIR/implicit_clone.rs:71:21
|
LL | let _ = vec_ref.to_vec();
| ^^^^^^ help: consider using: `clone`
error: implicitly cloning a `String` by calling `to_owned` on its dereferenced type
--> $DIR/implicit_clone.rs:83:17
|
LL | let _ = str.to_owned();
| ^^^^^^^^ help: consider using: `clone`
error: implicitly cloning a `Kitten` by calling `to_owned` on its dereferenced type
--> $DIR/implicit_clone.rs:87:20
|
LL | let _ = kitten.to_owned();
| ^^^^^^^^ help: consider using: `clone`
error: implicitly cloning a `PathBuf` by calling `to_owned` on its dereferenced type
--> $DIR/implicit_clone.rs:97:21
|
LL | let _ = pathbuf.to_owned();
| ^^^^^^^^ help: consider using: `clone`
error: implicitly cloning a `PathBuf` by calling `to_path_buf` on its dereferenced type
--> $DIR/implicit_clone.rs:98:21
|
LL | let _ = pathbuf.to_path_buf();
| ^^^^^^^^^^^ help: consider using: `clone`
error: implicitly cloning a `OsString` by calling `to_owned` on its dereferenced type
--> $DIR/implicit_clone.rs:101:23
|
LL | let _ = os_string.to_owned();
| ^^^^^^^^ help: consider using: `clone`
error: implicitly cloning a `OsString` by calling `to_os_string` on its dereferenced type
--> $DIR/implicit_clone.rs:102:23
|
LL | let _ = os_string.to_os_string();
| ^^^^^^^^^^^^ help: consider using: `clone`
error: aborting due to 10 previous errors