mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			287 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			287 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ dont-require-annotations: NOTE
 | 
						|
 | 
						|
macro_rules! foo {
 | 
						|
    ($d:expr) => {{
 | 
						|
        fn bar(d: u8) { }
 | 
						|
        bar(&mut $d);
 | 
						|
        //~^ ERROR mismatched types
 | 
						|
        //~| NOTE expected `u8`, found `&mut u8`
 | 
						|
    }}
 | 
						|
}
 | 
						|
 | 
						|
fn main() {
 | 
						|
    foo!(0u8);
 | 
						|
    //~^ NOTE in this expansion of foo!
 | 
						|
}
 |