2
0
Fork 0
mirror of https://github.com/rust-lang/rust-clippy synced 2024-12-27 21:43:30 +00:00
rust-clippy/tests/ui/str_to_string.stderr

18 lines
562 B
Text
Raw Normal View History

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