1// run-rustfix 2 3#[allow(clippy::string_add, unused)] 4#[warn(clippy::string_add_assign)] 5fn main() { 6 // ignores assignment distinction 7 let mut x = "".to_owned(); 8 9 for _ in 1..3 { 10 x += "."; 11 } 12 13 let y = "".to_owned(); 14 let z = y + "..."; 15 16 assert_eq!(&x, &z); 17 18 let mut x = 1; 19 x += 1; 20 assert_eq!(2, x); 21} 22