mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			285 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			285 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
#![feature(box_patterns)]
 | 
						|
 | 
						|
#![allow(dead_code)]
 | 
						|
#![deny(unreachable_patterns)]
 | 
						|
 | 
						|
enum Foo { A(Box<Foo>, isize), B(usize), }
 | 
						|
 | 
						|
fn main() {
 | 
						|
    match Foo::B(1) {
 | 
						|
        Foo::B(_) | Foo::A(box _, 1) => { }
 | 
						|
        Foo::A(_, 1) => { } //~ ERROR unreachable pattern
 | 
						|
        _ => { }
 | 
						|
    }
 | 
						|
}
 |