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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
212 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!()
}
}