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_expr / fn-name

fn-name
LineCoverageSource
514(if let PlaceExpr::Var(id) = place)
515(if !state.has_local(id))
5161(let fn_decl = env.crates().fn_named(id)?)
5171(if fn_decl.binder.len() == 0)
518N/A(let ty = Ty::rigid(RigidName::fn_def(id), ()))
──────── ("fn-name")
5217(borrow_check_expr(env, _assumptions, state, Expr::Place(place), _places_live_on_exit) => (ty, state))

7 tests exercised this rule:


Source location: tests/borrowck.rs:3027

fn bar() -> u32 {
    exists<'r0, 'r1> {
        let v: u32 = 1_u32;
        let p: &'r0 u32 = &'r1 v;
        foo(0_u32);
        return *p;
    }
}
Proof tree
… (200 of 1451 nodes shown)

Source location: tests/codegen.rs:64

fn main() -> () {
    let y: i32 = add_one(1_i32);
    println!(y);
}
Proof tree
… (200 of 1060 nodes shown)

Source location: tests/codegen.rs:188

fn main() -> () {
    let a: i32 = f(1_i32);
    let b: i32 = f(2_i32);
    let c: i32 = f(3_i32);
    println!(a);
    println!(b);
    println!(c);
}
Proof tree
… (200 of 1136 nodes shown)

Source location: tests/codegen.rs:201

fn main() -> () {
    let y: i32 = f(f(42_i32));
    println!(y);
}
Proof tree
… (200 of 1072 nodes shown)

Source location: tests/codegen.rs:218

fn main() -> () {
    let r: i32 = outer(7_i32);
    println!(r);
}
Proof tree
… (200 of 1131 nodes shown)

Source location: tests/codegen.rs:238

fn main() -> () {
    a();
}
Proof tree
… (200 of 1152 nodes shown)

Source location: tests/mir_typeck.rs:171

fn bar(v1: u32) -> u32 {
    let v0: u32 = foo(v1);
    return v0;
}
Proof tree
… (200 of 1077 nodes shown)