mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			348 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			348 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| #![feature(inline_const_pat)]
 | |
| 
 | |
| const unsafe fn require_unsafe() -> usize {
 | |
|     1
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     match () {
 | |
|         const {
 | |
|             require_unsafe();
 | |
|             //~^ ERROR [E0133]
 | |
|         } => (),
 | |
|     }
 | |
| 
 | |
|     match 1 {
 | |
|         const {
 | |
|             require_unsafe()
 | |
|             //~^ ERROR [E0133]
 | |
|         }..=4 => (),
 | |
|         _ => (),
 | |
|     }
 | |
| }
 | 
