]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/unit_arg.rs
iterate List by value
[rust.git] / tests / ui / unit_arg.rs
index 1403870eacfebc43b7e1962c8d5b5d40e99e2f7a..d90c49f79de623de06b623664d540e3f2498d4d0 100644 (file)
@@ -1,6 +1,6 @@
 // run-rustfix
 #![warn(clippy::unit_arg)]
-#![allow(clippy::no_effect, unused_must_use)]
+#![allow(unused_braces, clippy::no_effect, unused_must_use)]
 
 use std::fmt::Debug;
 
@@ -54,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();