1 // #47295: We used to have a hack of special-casing adjacent amtch
2 // arms whose patterns were composed solely of constants to not have
3 // them linked in the cfg.
5 // This was broken for various reasons. In particular, that hack was
6 // originally authored under the assunption that other checks
7 // elsewhere would ensure that the two patterns did not overlap. But
8 // that assumption did not hold, at least not in the long run (namely,
9 // overlapping patterns were turned into warnings rather than errors).
14 let x: Box<_> = Box::new(1);
19 (1, 2) if take(x) => (),
20 (1, 2) if take(x) => (), //~ ERROR use of moved value: `x`
25 fn take<T>(_: T) -> bool { false }