1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// run-rustfix // Tests from for_loop.rs that don't have suggestions #[warn(clippy::single_element_loop)] fn main() { let item1 = 2; { let item = &item1; println!("{}", item); } { let item = &item1; println!("{:?}", item); } }