mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			202 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			202 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ run-pass
 | 
						|
// Test that we can compile code that uses a `_` in function argument
 | 
						|
// patterns.
 | 
						|
 | 
						|
 | 
						|
fn foo((x, _): (isize, isize)) -> isize {
 | 
						|
    x
 | 
						|
}
 | 
						|
 | 
						|
pub fn main() {
 | 
						|
    assert_eq!(foo((22, 23)), 22);
 | 
						|
}
 |