return func_returning_result();
}
+ // no warning
+ let _ = if let Err(e) = x { Err(e) } else { Ok(0) };
+
Ok(y)
}
}
fn main() {}
+
+// should not lint, `?` operator not available in const context
+const fn issue9175(option: Option<()>) -> Option<()> {
+ if option.is_none() {
+ return None;
+ }
+ //stuff
+ Some(())
+}