2020-12-06 15:01:03 +01:00
|
|
|
#![warn(clippy::str_to_string)]
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let hello = "hello world".to_string();
|
2025-02-28 23:20:48 +01:00
|
|
|
//~^ str_to_string
|
|
|
|
|
|
2020-12-06 15:01:03 +01:00
|
|
|
let msg = &hello[..];
|
|
|
|
|
msg.to_string();
|
2025-02-28 23:20:48 +01:00
|
|
|
//~^ str_to_string
|
2020-12-06 15:01:03 +01:00
|
|
|
}
|