X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftools%2Fclippy%2Ftests%2Fui%2Fredundant_clone.fixed;h=da52c0acf93b0fd463f70b4af1f448ece365acfb;hb=721d53a54f73ebb023624625fe5f357478636694;hp=1525f6a93dfdd4dcac0492dad3adbf63e8f621f5;hpb=a9eb9c52f3e8d8b6402e6acc69b9bcfc4f371d58;p=rust.git diff --git a/src/tools/clippy/tests/ui/redundant_clone.fixed b/src/tools/clippy/tests/ui/redundant_clone.fixed index 1525f6a93df..da52c0acf93 100644 --- a/src/tools/clippy/tests/ui/redundant_clone.fixed +++ b/src/tools/clippy/tests/ui/redundant_clone.fixed @@ -1,6 +1,7 @@ // run-rustfix // rustfix-only-machine-applicable +#![feature(lint_reasons)] #![allow(clippy::implicit_clone, clippy::drop_non_drop)] use std::ffi::OsString; use std::path::Path; @@ -29,6 +30,10 @@ fn main() { #[allow(clippy::redundant_clone)] let _s = String::new().to_string(); + // Check that lint level works + #[expect(clippy::redundant_clone)] + let _s = String::new().to_string(); + let tup = (String::from("foo"),); let _t = tup.0;