mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 17:13:48 +00:00
18 lines
562 B
Plaintext
18 lines
562 B
Plaintext
error: `to_string()` called on a `&str`
|
|
--> tests/ui/str_to_string.rs:4:17
|
|
|
|
|
LL | let hello = "hello world".to_string();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"hello world".to_owned()`
|
|
|
|
|
= 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`
|
|
--> tests/ui/str_to_string.rs:7:5
|
|
|
|
|
LL | msg.to_string();
|
|
| ^^^^^^^^^^^^^^^ help: try: `msg.to_owned()`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|