We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b59f2ea commit 785582aCopy full SHA for 785582a
src/test/compile-fail/noncopyable-match-pattern.rs
@@ -0,0 +1,9 @@
1
+fn main() {
2
+ let x = some(unsafe::exclusive(false));
3
+ match x {
4
+ some(copy z) => { //~ ERROR copying a noncopyable value
5
+ do z.with |b| { assert !*b; }
6
+ }
7
+ none => fail
8
9
+}
0 commit comments