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: prove_ty_is_rigid / rigid

rigid
LineCoverageSource
──────── ("rigid")
92521(prove_ty_is_rigid(_env, _assumptions, state, TyData::RigidTy(rigid_ty)) => (rigid_ty, state))

21 tests exercised this rule:


Source location: tests/borrowck.rs:253

fn foo() -> Datum {
    let x: Pair = Pair { first: Datum { value: 1 _ u32 }, second: Datum { value: 2 _ u32 } };
    let a: Datum = x.first;
    let b: Datum = x.second;
    return b;
}
Proof tree
… (200 of 1154 nodes shown)

Source location: tests/borrowck.rs:2277

fn min_problem_case_4<'a>(list: &mut 'a Map, list2: &mut 'a Map) -> u32 {
    exists<'r0> {
        let num: &mut 'r0 u32 = &mut 'r0 (*list).value;
        list = &mut 'a *list2;
        num;
        return 0 _ u32;
    }
}
Proof tree
… (200 of 1262 nodes shown)

Source location: tests/borrowck.rs:2806

fn foo<'a>(a: &'a u32) -> &'a u32 {
    exists<'r0> {
        let r: &'r0 u32 = identity::<&'r0 u32>(a);
        return r;
    }
}
Proof tree
… (200 of 1138 nodes shown)

Source location: tests/borrowck.rs:2828

fn bar() -> u32 {
    exists<'r1> {
        let v: u32 = 7 _ u32;
        let r: u32 = foo::<'r1>(&'r1 v);
        return r;
    }
}
Proof tree
… (200 of 1223 nodes shown)

Source location: tests/borrowck.rs:2856

fn foo<'a, 'b>(a: &'a u32) -> &'b u32
where 'a: 'b {
    let r: &'b u32 = identity::<&'b u32>(a);
    return r;
}
Proof tree
… (200 of 1131 nodes shown)

Source location: tests/borrowck.rs:2901

fn foo<'b>(a: &'b u32) -> &'b u32 {
    let r: &'b u32 = bar::<'b, &'b u32>(a);
    return r;
}
Proof tree
… (200 of 1134 nodes shown)

Source location: tests/borrowck.rs:2922

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 1231 nodes shown)

Source location: tests/borrowck.rs:2976

fn foo() -> u32 {
    exists<'r0, 'r1, 'r2, 'r3> {
        let p: Point = Point { x: 0 _ u32, y: 0 _ u32 };
        let b1: &mut 'r0 u32 = &mut 'r1 p.x;
        let b2: &mut 'r2 u32 = &mut 'r3 p.y;
        *b1 = 1 _ u32;
        *b2 = 2 _ u32;
        return 0 _ u32;
    }
}
Proof tree
… (200 of 1318 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:79

fn main() -> () {
    let y: i32 = identity::<i32>(42 _ i32);
    println!(y);
}
Proof tree
… (200 of 1060 nodes shown)

Source location: tests/codegen.rs:141

fn main() -> () {
    let p: Pair = Pair { x: 10 _ i32, y: 20 _ i32 };
    println!(p.x);
    println!(p.y);
}

Proof trees omitted for the remaining 11 tests.


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);
}

Source location: tests/codegen.rs:201

fn main() -> () {
    let y: i32 = f(f(42 _ i32));
    println!(y);
}

Source location: tests/codegen.rs:218

fn main() -> () {
    let r: i32 = outer(7 _ i32);
    println!(r);
}

Source location: tests/codegen.rs:238

fn main() -> () {
    a();
}

Source location: tests/codegen.rs:251

fn main() -> () {
    let r: i32 = first::<i32, bool>(10 _ i32, true);
    println!(r);
}

Source location: tests/codegen.rs:264

fn main() -> () {
    let w: Wrapper<i32> = Wrapper::<i32> { val: 42 _ i32 };
    println!(w.val);
}

Source location: tests/mir_typeck.rs:171

fn bar(v1: u32) -> u32 {
    let v0: u32 = foo(v1);
    return v0;
}

Source location: tests/mir_typeck.rs:234

fn foo (v1: u32) -> u32 {
    let v2: Dummy = Dummy { value: 1 _ u32, is_true: false };
    v2.value = 2 _ u32;
    return v1;
}

Source location: tests/mir_typeck.rs:345

fn bar(v1: u32) -> u32 {
    let v0: u32 = identity::<u32>(v1);
    return v0;
}

Source location: tests/mir_typeck.rs:857

fn foo<'a>(v1: &'a Pair) -> u32 {
    exists<'r0> {
        let v2: u32 = (*v1).value;
        return v2;
    }
}