]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/question_mark.fixed
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / question_mark.fixed
index 57f23bd1916ffaa46272f152ebc52f5d79c1f8e3..993389232cc2955fc79bff5a28d0bdc0b0a8d57c 100644 (file)
@@ -223,3 +223,12 @@ fn pattern() -> Result<(), PatternedError> {
 }
 
 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(())
+}