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