]> git.lizzy.rs Git - rust.git/blob - src/test/ui/moves/move-in-guard-1.rs
Rollup merge of #105843 - compiler-errors:sugg-const, r=lcnr
[rust.git] / src / test / 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 }