summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/single_element_loop.fixed
blob: c307afffcb86325b7dac857ef288042e1a5bdce9 (plain)
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);
    }
}