]> git.lizzy.rs Git - rust.git/blob - tests/ui/reachable/unreachable-arm.rs
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / ui / reachable / unreachable-arm.rs
1 #![feature(box_patterns)]
2
3 #![allow(dead_code)]
4 #![deny(unreachable_patterns)]
5
6 enum Foo { A(Box<Foo>, isize), B(usize), }
7
8 fn main() {
9     match Foo::B(1) {
10         Foo::B(_) | Foo::A(box _, 1) => { }
11         Foo::A(_, 1) => { } //~ ERROR unreachable pattern
12         _ => { }
13     }
14 }