mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	 3815ed63ed
			
		
	
	
		3815ed63ed
		
	
	
	
	
		
			
			While working on #122661, some of these started triggering our "unnecessary parens" lints due to a change in the `assert!` desugaring. A cursory search identified a few more. Some of these have been carried from before 1.0, were a bulk rename from the previous name of `assert!` left them in that state. I went and removed as many of these unnecessary parens as possible in order to have fewer annoyances in the future if we make the lint smarter.
		
			
				
	
	
		
			16 lines
		
	
	
		
			305 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			305 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ run-pass
 | |
| #![allow(unused_assignments)]
 | |
| #![allow(unused_variables)]
 | |
| 
 | |
| pub fn main() {
 | |
|     let mut y: isize = 42;
 | |
|     let mut z: isize = 42;
 | |
|     let mut x: isize;
 | |
|     while z < 50 {
 | |
|         z += 1;
 | |
|         while false { x = y; y = z; }
 | |
|         println!("{}", y);
 | |
|     }
 | |
|     assert!(y == 42 && z == 50);
 | |
| }
 |