mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	 b9e9be38c0
			
		
	
	
		b9e9be38c0
		
	
	
	
	
		
			
			Since [1], the fragment specifier is unconditionally required in all editions. This means `NonTerminalKind` no longer needs to be optional, as we can reject this code during the expansion of `macro_rules!` rather than handling it throughout the code. Do this cleanup here. [1]: https://github.com/rust-lang/rust/pull/128425
		
			
				
	
	
		
			13 lines
		
	
	
		
			270 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			270 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ compile-flags: -Zdeduplicate-diagnostics=yes
 | |
| 
 | |
| macro_rules! m {
 | |
|     ($name) => {}; //~ ERROR missing fragment
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     m!(); //~ ERROR unexpected end
 | |
|     m!(); //~ ERROR unexpected end
 | |
|     m!(); //~ ERROR unexpected end
 | |
|     m!(); //~ ERROR unexpected end
 | |
| }
 |