2012-08-24 14:26:07 -05:00
|
|
|
fn main() {
|
2012-09-18 16:51:40 -05:00
|
|
|
let x = Some(private::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
|
|
|
}
|
|
|
|
}
|