about summary refs log tree commit diff
path: root/tests/ui/liveness/liveness-assign/liveness-assign-imm-local-in-loop.rs
blob: d2f32a47122c23a2ad982d58cf6eaa1968cd46f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
fn test() {
    let v: isize;
    //~^ HELP consider making this binding mutable
    //~| SUGGESTION mut
    loop {
        v = 1; //~ ERROR cannot assign twice to immutable variable `v`
               //~| NOTE cannot assign twice to immutable variable
    }
}

fn main() {
}