]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/move-in-guard-2.rs
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / moves / move-in-guard-2.rs
1 pub fn main() {
2     let x: Box<_> = Box::new(1);
3
4     let v = (1, 2);
5
6     match v {
7         (1, _) |
8         (_, 2) if take(x) => (), //~ ERROR use of moved value: `x`
9         _ => (),
10     }
11 }
12
13 fn take<T>(_: T) -> bool { false }