11 lines
182 B
Rust
11 lines
182 B
Rust
#![warn(clippy::str_to_string)]
|
|
|
|
fn main() {
|
|
let hello = "hello world".to_owned();
|
|
//~^ str_to_string
|
|
|
|
let msg = &hello[..];
|
|
msg.to_owned();
|
|
//~^ str_to_string
|
|
}
|