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

Test remove_last_node_iterative

Source location: tests/borrowck.rs:4214

fn remove_last_node_iterative<'a>(node: &'a mut List) -> u32 {
    exists<'r0, 'r1> {
        let cursor: &'r0 mut List = &'r0 mut *node;
        'l: loop {
            let next: &'r1 mut List = &'r1 mut *cursor;
            if true {
                cursor = next;
            } else {
                break 'l;
            }
        }
        *cursor = List { value: 0_u32 };
        return 0_u32;
    }
}

Rules proved (93)

JudgmentRuleAll tests of this rule
access_kind_for_place_usemove100 tests
access_permittedaccess_permitted103 tests
access_permitted_by_loanborrow of disjoint places41 tests
access_permitted_by_loanloan is dead18 tests
access_permitted_by_loanwrite-indirect10 tests
access_permitted_by_loansaccess_permitted_by_loans106 tests
borrow_checkborrow_check175 tests
borrow_check_blockbasic block175 tests
borrow_check_exprassign27 tests
borrow_check_exprliteral114 tests
borrow_check_exprplace100 tests
borrow_check_exprref41 tests
borrow_check_exprstruct19 tests
borrow_check_exprtrue28 tests
borrow_check_expr_has_tyblock118 tests
borrow_check_loopfixed-point23 tests
borrow_check_looploop20 tests
borrow_check_place_exprderef-ref42 tests
borrow_check_place_exprlocal103 tests
borrow_check_statementbreak17 tests
borrow_check_statementexists48 tests
borrow_check_statementexpr47 tests
borrow_check_statementif29 tests
borrow_check_statementlet94 tests
borrow_check_statementloop23 tests
borrow_check_statementreturn79 tests
can_outliveexistential target20 tests
check_adtcheck adt59 tests
check_all_cratescheck all prefixes214 tests
check_associated_tycheck associated ty195 tests
check_associated_ty_valuecheck_associated_ty_value194 tests
check_coherencecheck_coherence214 tests
check_cratecheck crate214 tests
check_crate_itemadt59 tests
check_crate_itemfeature gate62 tests
check_crate_itemfree fn175 tests
check_crate_itemtrait214 tests
check_crate_itemtrait impl210 tests
check_drop_impl_always_applicablenot a Drop impl210 tests
check_fncheck fn200 tests
check_fn_bodyexpr fn body175 tests
check_fn_bodyno fn body192 tests
check_fn_in_traitcheck fn in trait193 tests
check_free_fncheck free fn175 tests
check_safety_matchessafety matches210 tests
check_traitcheck trait214 tests
check_trait_implcheck_trait_impl210 tests
check_trait_impl_itemassociated ty value194 tests
check_trait_itemassociated ty in trait195 tests
check_trait_itemfn in trait193 tests
drop_placesdrop_places175 tests
is_local_trait_reflocal trait205 tests
loan_cannot_outlive_universal_regionsloan_not_required_by_universal_regions18 tests
loan_not_required_by_live_placesloan_not_required_by_live_places18 tests
only_assumed_outlivesexistential43 tests
only_assumed_outlivesuniversal lifetime25 tests
orphan_checkorphan_check210 tests
overlap_check_impldifferent trait194 tests
overlap_check_implnot goal195 tests
overlap_check_implsame impl210 tests
prove_afterprove_after237 tests
prove_assignablesubtype129 tests
prove_eqexistential223 tests
prove_eqrigid201 tests
prove_eqsymmetric220 tests
prove_existential_var_eqexistential-existential21 tests
prove_existential_var_eqexistential-nonvar56 tests
prove_existential_var_eqexistential-universal214 tests
prove_normalizenormalize-via-impl55 tests
prove_outlivesanything can be pending29 tests
prove_outlivesoutlive through assumption195 tests
prove_outlivesrigid types55 tests
prove_place_is_movablelocal89 tests
prove_predicateeq231 tests
prove_predicateoutlives195 tests
prove_predicateparameter well formed204 tests
prove_predicatepositive impl219 tests
prove_predicatesubtype134 tests
prove_predicatetrait ref is local211 tests
prove_predicate_listnone238 tests
prove_predicate_listsome237 tests
prove_sublifetime => outlives29 tests
prove_subnormalize-l29 tests
prove_subnormalize-r12 tests
prove_subrigid33 tests
prove_ty_is_refref10 tests
prove_ty_is_rigidrigid76 tests
prove_wfADT46 tests
prove_wfintegers and booleans131 tests
prove_wfreferences192 tests
prove_wftuples200 tests
prove_wfuniversal variables206 tests
verify_universal_outlivesverify_universal_outlives44 tests

Premises failed (24)

The last column links to the premise’s page when the judgment view counts this failure against that premise. It does not when the premise is read as infallible, or when the failure was blamed inside a multi-line premise that carries no record on its own first line.

JudgmentRulePremiseAll tests of this premise
borrow_checkborrow_checkborrow_check_block(env, assumptions, state, bloc… (line 135)79 tests
borrow_check_blockbasic blockfor_all(i in 0..stmts.len()) with(env, state) (b… (line 156, blamed at line 157)not counted by the judgment view
borrow_check_statementexprborrow_check_expr( env, assumptions, state, expr… (line 232)26 tests
borrow_check_statementexistsscope(env.enter_existentially(&with_variables(bi… (line 310, blamed at line 312)not counted by the judgment view
borrow_check_statementexistsscope(env.enter_existentially(&with_variables(bi… (line 324, blamed at line 327)not counted by the judgment view
borrow_check_exprassignaccess_permitted( env, assumptions, state, Acces… (line 416)11 tests
access_permittedaccess_permittedaccess_permitted_by_loans(env, assumptions, stat… (line 878)24 tests
access_permitted_by_loansaccess_permitted_by_loansfor_all(loan in &state.current.loans_live) with(… (line 897, blamed at line 898)not counted by the judgment view
access_permitted_by_loanborrow of disjoint placesif place_disjoint_from_place(&loan.place, &acces… (line 920)29 tests
access_permitted_by_loanwrite-indirectif let TypedPlaceExpressionData::Deref(place_loa… (line 947)24 tests
access_permitted_by_loanwrite-indirectif place_accessed.is_prefix_of(place_loaned_ref) (line 949)8 tests
access_permitted_by_loanloan is deadloan_not_required_by_live_places(env, assumption… (line 967)29 tests
loan_not_required_by_live_placesloan_not_required_by_live_placesfor_all(live_place in places_live_after_access) … (line 1319, blamed at line 1321)not counted by the judgment view
loan_not_required_by_live_placeloan is not required by typeloan_not_required_by_parameter(env, assumptions,… (line 1348)29 tests
loan_not_required_by_parameterrigid-tyloan_not_required_by_parameters(env, assumptions… (line 1416)29 tests
loan_not_required_by_parameterlifetimeloan_cannot_outlive(env, assumptions, outlives, … (line 1506)29 tests
loan_cannot_outliveloan_cannot_outliveif !outlived_by_loan.contains(&lifetime.upcast()… (line 1526)29 tests
loan_not_required_by_parametersloan_not_required_by_parametersfor_all(param in live_parameters) (loan_not_requ… (line 1553, blamed at line 1554)not counted by the judgment view
check_free_fncheck free fncheck_fn(program, Env::default(), Predicates::t(… (line 24)81 tests
check_fncheck fnscope(enter_universally(env, &f.binder) => (env,… (line 48, blamed at line 54)not counted by the judgment view
check_fn_bodyexpr fn bodyborrow_check(typeck_env, assumptions, initial_st… (line 89)79 tests
check_all_cratescheck all prefixesfor_all(i in 0..crates.len()) (let program = cra… (line 52, blamed at line 54)not counted by the judgment view
check_cratecheck cratefor_all(item in &c.items) (check_crate_item(prog… (line 73, blamed at line 74)not counted by the judgment view
check_crate_itemfree fncheck_free_fn(program, f, crate_id) => () (line 207)81 tests

Proof trees

Proof tree
… (200 of 4241 nodes shown)
Failed proof tree

How to read this page