mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			200 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			200 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ run-pass
 | 
						|
// shouldn't affect evaluation of $ex.
 | 
						|
macro_rules! bad_macro { ($ex:expr) => (
 | 
						|
    {match 9 {_x => $ex}}
 | 
						|
)}
 | 
						|
 | 
						|
fn main() {
 | 
						|
    match 8 {
 | 
						|
        _x => assert_eq!(bad_macro!(_x),8)
 | 
						|
    }
 | 
						|
}
 |