Skip to content

Commit 785582a

Browse files
bblumcatamorphism
authored andcommitted
Add a compile-fail test for rust-lang#3255
1 parent b59f2ea commit 785582a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: src/test/compile-fail/noncopyable-match-pattern.rs

+9
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)