mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			238 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			238 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ run-rustfix
 | 
						|
 | 
						|
#![feature(box_patterns)]
 | 
						|
#![allow(dead_code)]
 | 
						|
 | 
						|
fn foo(f: Option<Box<i32>>) {
 | 
						|
    match f {
 | 
						|
        Some(ref box _i) => {},
 | 
						|
        //~^ ERROR switch the order of `ref` and `box`
 | 
						|
        None => {}
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
fn main() { }
 |