]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/result_map_unit_fn_fixable.rs
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / result_map_unit_fn_fixable.rs
index 4a901fd4d144fabac5801b35aabaea229ef6279f..44f50d21109cddefefd4cd41f12dab76dd965f74 100644 (file)
@@ -1,8 +1,7 @@
 // run-rustfix
-
-#![feature(never_type)]
 #![warn(clippy::result_map_unit_fn)]
-#![allow(unused, clippy::unused_self)]
+#![allow(unused)]
+#![allow(clippy::uninlined_format_args)]
 
 fn do_nothing<T>(_: T) {}
 
@@ -19,9 +18,9 @@ struct HasResult {
 }
 
 impl HasResult {
-    fn do_result_nothing(self: &Self, value: usize) {}
+    fn do_result_nothing(&self, value: usize) {}
 
-    fn do_result_plus_one(self: &Self, value: usize) -> usize {
+    fn do_result_plus_one(&self, value: usize) -> usize {
         value + 1
     }
 }
@@ -76,6 +75,8 @@ fn result_map_unit_fn() {
 
 
     x.field.map(|ref value| { do_nothing(value + captured) });
+
+    x.field.map(|value| println!("{:?}", value));
 }
 
 fn main() {}