2020-12-06 15:01:03 +01:00
|
|
|
error: `to_string()` called on a `&str`
|
2024-02-27 15:25:18 +01:00
|
|
|
--> tests/ui/str_to_string.rs:4:17
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
LL | let hello = "hello world".to_string();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider using `.to_owned()`
|
2022-09-22 20:04:22 +04:00
|
|
|
= note: `-D clippy::str-to-string` implied by `-D warnings`
|
2023-08-01 14:02:21 +02:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::str_to_string)]`
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
error: `to_string()` called on a `&str`
|
2024-02-27 15:25:18 +01:00
|
|
|
--> tests/ui/str_to_string.rs:7:5
|
2020-12-06 15:01:03 +01:00
|
|
|
|
|
|
|
|
LL | msg.to_string();
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider using `.to_owned()`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|