]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/blacklisted_name.rs
iterate List by value
[rust.git] / tests / ui / blacklisted_name.rs
index c1abbf1bb9d9f9da972e23ca855d0898fba686fc..ca9d8d16b787df5af6c08f834306dd49d9ed3cf2 100644 (file)
@@ -1,10 +1,12 @@
-#![feature(plugin)]
-#![plugin(clippy)]
-
-#![allow(dead_code)]
-#![allow(single_match)]
-#![allow(unused_variables, similar_names)]
-#![deny(blacklisted_name)]
+#![allow(
+    dead_code,
+    clippy::similar_names,
+    clippy::single_match,
+    clippy::toplevel_ref_arg,
+    unused_mut,
+    unused_variables
+)]
+#![warn(clippy::blacklisted_name)]
 
 fn test(foo: ()) {}
 
@@ -21,3 +23,18 @@ fn main() {
         _ => (),
     }
 }
+
+fn issue_1647(mut foo: u8) {
+    let mut bar = 0;
+    if let Some(mut baz) = Some(42) {}
+}
+
+fn issue_1647_ref() {
+    let ref bar = 0;
+    if let Some(ref baz) = Some(42) {}
+}
+
+fn issue_1647_ref_mut() {
+    let ref mut bar = 0;
+    if let Some(ref mut baz) = Some(42) {}
+}