]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/unit_arg.rs
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / unit_arg.rs
index 7e421a0d6052363097ff6e9736fc0d4f9ca27c84..c15b0a50045565b691a751af079e54211030e052 100644 (file)
@@ -1,5 +1,6 @@
+// run-rustfix
 #![warn(clippy::unit_arg)]
-#![allow(clippy::no_effect)]
+#![allow(clippy::no_effect, unused_must_use)]
 
 use std::fmt::Debug;
 
@@ -53,6 +54,17 @@ fn question_mark() -> Result<(), ()> {
     Ok(())
 }
 
+#[allow(dead_code)]
+mod issue_2945 {
+    fn unit_fn() -> Result<(), i32> {
+        Ok(())
+    }
+
+    fn fallible() -> Result<(), i32> {
+        Ok(unit_fn()?)
+    }
+}
+
 fn main() {
     bad();
     ok();