rust/src/test/run-pass/bind-by-move.rs

12 lines
199 B
Rust
Raw Normal View History

use std::sync::Arc;
fn dispose(_x: Arc<bool>) { }
pub fn main() {
let p = Arc::new(true);
let x = Some(p);
2013-02-15 10:44:18 +00:00
match x {
Some(z) => { dispose(z); },
None => panic!()
}
}