]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/blacklisted_name.rs
iterate List by value
[rust.git] / tests / ui / blacklisted_name.rs
index 16b4240fac2d3452a52f45ae311cd15f9d334ebe..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: ()) {}
 
@@ -18,9 +20,21 @@ fn main() {
 
     match (42, Some(1337), Some(0)) {
         (foo, Some(bar), baz @ Some(_)) => (),
+        _ => (),
+    }
+}
 
+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) {}
 }