rust/tests/ui/string_to_string.fixed
2025-05-19 19:29:04 -04:00

8 lines
255 B
Rust

#![warn(clippy::implicit_clone)]
#![allow(clippy::redundant_clone)]
fn main() {
let mut message = String::from("Hello");
let mut v = message.clone();
//~^ ERROR: implicitly cloning a `String` by calling `to_string` on its dereferenced type
}