2020-12-06 08:01:03 -06:00
|
|
|
#![warn(clippy::str_to_string)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let hello = "hello world".to_string();
|
2023-08-24 14:32:12 -05:00
|
|
|
//~^ ERROR: `to_string()` called on a `&str`
|
2020-12-06 08:01:03 -06:00
|
|
|
let msg = &hello[..];
|
|
|
|
msg.to_string();
|
2023-08-24 14:32:12 -05:00
|
|
|
//~^ ERROR: `to_string()` called on a `&str`
|
2020-12-06 08:01:03 -06:00
|
|
|
}
|