blob: f93b289c29ab3af62b8b4317168ae78143c281cf (
plain)
1
2
3
4
5
6
7
8
9
|
#![warn(clippy::str_to_string)]
fn main() {
let hello = "hello world".to_string();
//~^ ERROR: `to_string()` called on a `&str`
let msg = &hello[..];
msg.to_string();
//~^ ERROR: `to_string()` called on a `&str`
}
|