mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			287 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			287 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ run-pass
 | 
						|
 | 
						|
pub fn main() {
 | 
						|
    let mut x: isize = 1;
 | 
						|
    x *= 2;
 | 
						|
    println!("{}", x);
 | 
						|
    assert_eq!(x, 2);
 | 
						|
    x += 3;
 | 
						|
    println!("{}", x);
 | 
						|
    assert_eq!(x, 5);
 | 
						|
    x *= x;
 | 
						|
    println!("{}", x);
 | 
						|
    assert_eq!(x, 25);
 | 
						|
    x /= 5;
 | 
						|
    println!("{}", x);
 | 
						|
    assert_eq!(x, 5);
 | 
						|
}
 |