]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/or_fun_call.rs
Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup
[rust.git] / src / tools / clippy / tests / ui / or_fun_call.rs
index 2473163d4fd2f4e74752d1f1178d079525ba8c78..628c970463890db8d636e86de6f2694372e9c4b7 100644 (file)
@@ -225,4 +225,31 @@ fn less_than_max_suggestion_highest_lines() {
     }
 }
 
+mod issue9608 {
+    fn sig_drop() {
+        enum X {
+            X(std::fs::File),
+            Y(u32),
+        }
+
+        let _ = None.unwrap_or(X::Y(0));
+    }
+}
+
+mod issue8993 {
+    fn g() -> i32 {
+        3
+    }
+
+    fn f(n: i32) -> i32 {
+        n
+    }
+
+    fn test_map_or() {
+        let _ = Some(4).map_or(g(), |v| v);
+        let _ = Some(4).map_or(g(), f);
+        let _ = Some(4).map_or(0, f);
+    }
+}
+
 fn main() {}