mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			256 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			256 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // run-pass
 | |
| // Why one-tuples? Because macros.
 | |
| 
 | |
| 
 | |
| pub fn main() {
 | |
|     match ('c',) {
 | |
|         (x,) => {
 | |
|             assert_eq!(x, 'c');
 | |
|         }
 | |
|     }
 | |
|     // test the 1-tuple type too
 | |
|     let x: (char,) = ('d',);
 | |
|     let (y,) = x;
 | |
|     assert_eq!(y, 'd');
 | |
| }
 | 
