mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			236 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			236 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ check-pass
 | 
						|
 | 
						|
macro_rules! exp {
 | 
						|
    (const $n:expr) => {
 | 
						|
        $n
 | 
						|
    };
 | 
						|
}
 | 
						|
 | 
						|
macro_rules! stmt {
 | 
						|
    (exp $e:expr) => {
 | 
						|
        $e
 | 
						|
    };
 | 
						|
    (exp $($t:tt)+) => {
 | 
						|
        exp!($($t)+)
 | 
						|
    };
 | 
						|
}
 | 
						|
 | 
						|
fn main() {
 | 
						|
    stmt!(exp const 1);
 | 
						|
}
 |