2012-08-24 14:26:07 -05:00
|
|
|
fn main() {
|
2012-08-20 14:23:37 -05:00
|
|
|
let x = Some(unsafe::exclusive(false));
|
2012-08-24 14:26:07 -05:00
|
|
|
match x {
|
2012-08-20 14:23:37 -05:00
|
|
|
Some(copy z) => { //~ ERROR copying a noncopyable value
|
2012-08-24 14:26:07 -05:00
|
|
|
do z.with |b| { assert !*b; }
|
|
|
|
}
|
2012-08-20 14:23:37 -05:00
|
|
|
None => fail
|
2012-08-24 14:26:07 -05:00
|
|
|
}
|
|
|
|
}
|