]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/needless_borrow.rs
Fix a false-positive of needless_borrow
[rust.git] / tests / ui / needless_borrow.rs
index 1cf7b40661d0d97e0d5642a7cb9a72ddac288eba..29e6ccca94d5b9f58b24e105883e924917cce493 100644 (file)
@@ -8,7 +8,7 @@
 // except according to those terms.
 
 
-#![feature(tool_lints)]
+
 
 use std::borrow::Cow;
 
@@ -63,3 +63,10 @@ fn issue_1432() {
 
     let _ = v.iter().filter(|&a| a.is_empty());
 }
+
+#[allow(dead_code)]
+#[warn(clippy::needless_borrow)]
+#[derive(Debug)]
+enum Foo<'a> {
+    Str(&'a str),
+}