rust/tests/ui/bind-by-move.rs

14 lines
213 B
Rust
Raw Normal View History

//@ run-pass
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!()
}
}