summary refs log tree commit diff
path: root/src/test/compile-fail/noncopyable-match-pattern.rs
blob: 29cfe9423fff76a74b80a676ccb4a7cdc5a0a874 (plain)
1
2
3
4
5
6
7
8
9
fn main() {
    let x = Some(private::exclusive(false));
    match x {
        Some(copy z) => { //~ ERROR copying a noncopyable value
            do z.with |b| { assert !*b; }
        }
        None => fail
    }
}