]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/redundant_clone.fixed
Merge commit '0cb0f7636851f9fcc57085cf80197a2ef6db098f' into clippyup
[rust.git] / src / tools / clippy / tests / ui / redundant_clone.fixed
index 1525f6a93dfdd4dcac0492dad3adbf63e8f621f5..da52c0acf93b0fd463f70b4af1f448ece365acfb 100644 (file)
@@ -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;