2020-11-14 19:21:33 +05:30
|
|
|
#![warn(clippy::str_to_string)]
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let hello = "hello world".to_string();
|
2025-02-11 17:57:08 +01:00
|
|
|
//~^ str_to_string
|
|
|
|
|
|
2020-11-14 19:21:33 +05:30
|
|
|
let msg = &hello[..];
|
|
|
|
|
msg.to_string();
|
2025-02-11 17:57:08 +01:00
|
|
|
//~^ str_to_string
|
2020-11-14 19:21:33 +05:30
|
|
|
}
|