summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-for-loop-uninitialized-binding.rs
blob: f619c045b250f1264375b22affd6e197894afc19 (plain)
1
2
3
4
5
6
7
fn f() -> isize {
    let mut x: isize;
    for _ in 0..0 { x = 10; }
    return x; //~ ERROR E0381
}

fn main() { f(); }