Files
rust/tests/ui/pattern/pattern-match-arc-move.rs

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

16 lines
288 B
Rust
Raw Normal View History

2025-06-01 00:03:54 +05:00
//! Tests moving an `Arc` value out of an `Option` in a match expression.
//@ 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 02:44:18 -08:00
match x {
Some(z) => { dispose(z); },
None => panic!()
}
}