mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			328 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			328 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ check-pass
 | |
| 
 | |
| enum E {
 | |
|     Foo(String, String, String),
 | |
| }
 | |
| 
 | |
| struct Bar {
 | |
|     a: String,
 | |
|     b: String,
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     let bar = Bar { a: "1".to_string(), b: "2".to_string() };
 | |
|     match E::Foo("".into(), "".into(), "".into()) {
 | |
|         E::Foo(a, b, ref c) => {}
 | |
|     }
 | |
|     match bar {
 | |
|         Bar { a, ref b } => {}
 | |
|     }
 | |
| }
 | 
