mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			240 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			240 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ check-pass
 | |
| struct A;
 | |
| 
 | |
| impl From<A> for [u8; 2] {
 | |
|     fn from(a: A) -> Self {
 | |
|         [0; 2]
 | |
|     }
 | |
| }
 | |
| 
 | |
| impl From<A> for [u8; 3] {
 | |
|     fn from(a: A) -> Self {
 | |
|         [0; 3]
 | |
|     }
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     let a = A;
 | |
|     let [_, _] = a.into();
 | |
| }
 | 
