]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/question_mark.rs
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / question_mark.rs
index 436f027c215d54f459d244628acd9b358899c51c..9ae0d88829af55cb91d387cadd0bc84a83a119e8 100644 (file)
@@ -259,3 +259,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(())
+}