]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/move-in-guard-1.rs
Auto merge of #106520 - ehuss:update-mdbook, r=Mark-Simulacrum
[rust.git] / tests / ui / moves / move-in-guard-1.rs
1 pub fn main() {
2
3
4     let x: Box<_> = Box::new(1);
5
6     let v = (1, 2);
7
8     match v {
9         (1, _) if take(x) => (),
10         (_, 2) if take(x) => (), //~ ERROR use of moved value: `x`
11         _ => (),
12     }
13 }
14
15 fn take<T>(_: T) -> bool { false }