2020-11-14 07:51:33 -06:00
|
|
|
#![warn(clippy::str_to_string)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let hello = "hello world".to_string();
|
2023-07-28 14:35:48 -05:00
|
|
|
//~^ ERROR: `to_string()` called on a `&str`
|
2020-11-14 07:51:33 -06:00
|
|
|
let msg = &hello[..];
|
|
|
|
msg.to_string();
|
2023-07-28 14:35:48 -05:00
|
|
|
//~^ ERROR: `to_string()` called on a `&str`
|
2020-11-14 07:51:33 -06:00
|
|
|
}
|