Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Positive coverage: borrow_check_statement / continue

continue
LineCoverageSource
270✗(if state.scope_has_label(label))
2711(if let Some(places_live_on_continue) = state.live_after_continue(label))
272N/A(let locals_to_drop = state.locals_dropped_to_label(label))
2731(drop_places(env, assumptions, state, locals_to_drop, places_live_on_continue) => state)
274N/A(let state = state.with_continue(label))
275N/A(let state = state.diverges())
──────── ("continue")
2773(borrow_check_statement(env, assumptions, state, Stmt::Continue { label }, places_live_on_exit) => (env, state))

3 tests exercised this rule:


Source location: tests/borrowck.rs:3156 (all coverage from this test)

fn foo() -> u32 {
    exists<'r0, 'r1> {
        'a: loop {
            let x: i32 = 0_i32;
            let r: &'r0 i32 = &'r1 x;
            let _y: i32 = *r;
            continue 'a;
        }
    }
}
Proof tree
… (200 of 3844 nodes shown)

Source location: tests/codegen.rs:410 (all coverage from this test)

fn main() -> () {
    let x: i32 = 0_i32;
    'a: loop {
        if true {
            println!(x);
            break 'a;
        } else {
            continue 'a;
        }
    }
}
Proof tree
… (200 of 3461 nodes shown)

Source location: tests/mir_typeck.rs:1073 (all coverage from this test)

fn foo() -> u32 {
    'a: loop {
        continue 'a;
    }
    return 0_u32;
}
Proof tree
… (200 of 3400 nodes shown)

How to read this page