mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			217 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			217 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // run-pass
 | |
| // Test that we "reset" the mode as we pass through a `&` pattern.
 | |
| //
 | |
| // cc #46688
 | |
| 
 | |
| fn surprise(x: i32) {
 | |
|     assert_eq!(x, 2);
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     let x = &(1, &2);
 | |
|     let (_, &b) = x;
 | |
|     surprise(b);
 | |
| }
 | 
