mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			642 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			642 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
#![feature(trace_macros)]
 | 
						|
 | 
						|
fn main() {
 | 
						|
    trace_macros!(); //~ ERROR trace_macros! accepts only `true` or `false`
 | 
						|
    trace_macros!(1); //~ ERROR trace_macros! accepts only `true` or `false`
 | 
						|
    trace_macros!(ident); //~ ERROR trace_macros! accepts only `true` or `false`
 | 
						|
    trace_macros!(for); //~ ERROR trace_macros! accepts only `true` or `false`
 | 
						|
    trace_macros!(true,); //~ ERROR trace_macros! accepts only `true` or `false`
 | 
						|
    trace_macros!(false 1); //~ ERROR trace_macros! accepts only `true` or `false`
 | 
						|
 | 
						|
 | 
						|
    // should be fine:
 | 
						|
    macro_rules! expando {
 | 
						|
        ($x: ident) => { trace_macros!($x) }
 | 
						|
    }
 | 
						|
 | 
						|
    expando!(true);
 | 
						|
}
 |