We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be8a08b commit b8710deCopy full SHA for b8710de
src/test/compile-fail/issue-2111.rs
@@ -0,0 +1,11 @@
1
+fn foo(a: option<uint>, b: option<uint>) {
2
+ alt (a,b) { //! ERROR: non-exhaustive patterns: none not covered
3
+ (some(a), some(b)) if a == b { }
4
+ (some(_), none) |
5
+ (none, some(_)) { }
6
+ }
7
+}
8
+
9
+fn main() {
10
+ foo(none, none);
11
src/test/run-pass/issue-912.rs
@@ -0,0 +1,8 @@
+// xfail-test
+fn find<T>(_f: fn(@T) -> bool, _v: [@T]) {}
+ let x = 10, arr = [];
+ find({|f| f.id == x}, arr);
+ arr += [{id: 20}]; // This assigns a type to arr
0 commit comments