]> git.lizzy.rs Git - rust.git/blob - src/test/ui/moves/move-in-guard-2.rs
Auto merge of #73660 - flip1995:clippyup, r=nikomatsakis
[rust.git] / src / test / ui / moves / move-in-guard-2.rs
1 #![feature(box_syntax)]
2
3 pub fn main() {
4     let x: Box<_> = box 1;
5
6     let v = (1, 2);
7
8     match v {
9         (1, _) |
10         (_, 2) if take(x) => (), //~ ERROR use of moved value: `x`
11         _ => (),
12     }
13 }
14
15 fn take<T>(_: T) -> bool { false }