rust-clippy/tests/ui/str_to_string.stderr
2023-08-22 17:18:11 +02:00

19 lines
498 B
Text

error: `to_string()` called on a `&str`
--> $DIR/str_to_string.rs:4:17
|
LL | let hello = "hello world".to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using `.to_owned()`
= note: `-D clippy::str-to-string` implied by `-D warnings`
error: `to_string()` called on a `&str`
--> $DIR/str_to_string.rs:7:5
|
LL | msg.to_string();
| ^^^^^^^^^^^^^^^
|
= help: consider using `.to_owned()`
error: aborting due to 2 previous errors