2020-12-06 08:01:03 -06:00
|
|
|
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()`
|
2022-09-22 11:04:22 -05:00
|
|
|
= note: `-D clippy::str-to-string` implied by `-D warnings`
|
2020-12-06 08:01:03 -06:00
|
|
|
|
|
|
|
error: `to_string()` called on a `&str`
|
2023-07-28 14:35:48 -05:00
|
|
|
--> $DIR/str_to_string.rs:7:5
|
2020-12-06 08:01:03 -06:00
|
|
|
|
|
|
|
|
LL | msg.to_string();
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider using `.to_owned()`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|