mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	Key changes include: - Removal of the word "syntax" from the lint message. More accurately, it could have been something like "syntax group" or "syntax category", but avoiding it completely is easier. - The primary lint message now reflects exactly which mismatch is occurring, instead of trying to be general. A new `help` line is general across the mismatch kinds. - Suggestions have been reduced to be more minimal, no longer also changing non-idiomatic but unrelated aspects. - Suggestion text no longer mentions changes when those changes don't occur in that specific suggestion.
		
			
				
	
	
		
			16 lines
		
	
	
		
			754 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			754 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
warning: eliding a lifetime that's named elsewhere is confusing
 | 
						|
  --> $DIR/rpit-assoc-pair-with-lifetime.rs:3:31
 | 
						|
   |
 | 
						|
LL | pub fn iter<'a>(v: Vec<(u32, &'a u32)>) -> impl DoubleEndedIterator<Item = (u32, &u32)> {
 | 
						|
   |                               ^^ the lifetime is named here                      ---- the same lifetime is elided here
 | 
						|
   |
 | 
						|
   = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
 | 
						|
   = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
 | 
						|
help: consistently use `'a`
 | 
						|
   |
 | 
						|
LL | pub fn iter<'a>(v: Vec<(u32, &'a u32)>) -> impl DoubleEndedIterator<Item = (u32, &'a u32)> {
 | 
						|
   |                                                                                   ++
 | 
						|
 | 
						|
warning: 1 warning emitted
 | 
						|
 |