mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			208 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			208 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| fn foo() -> i32 {
 | |
|     4
 | |
| }
 | |
| fn main() {
 | |
|     let x: u16 = foo();
 | |
|     //~^ ERROR mismatched types
 | |
|     let y: i64 = x + x;
 | |
|     //~^ ERROR mismatched types
 | |
|     let z: i32 = x + x;
 | |
|     //~^ ERROR mismatched types
 | |
| }
 | 
