// 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;
Ok(())
}
+#[allow(dead_code)]
+mod issue_2945 {
+ fn unit_fn() -> Result<(), i32> {
+ Ok(())
+ }
+
+ fn fallible() -> Result<(), i32> {
+ Ok(unit_fn()?)
+ }
+}
+
fn main() {
bad();
ok();