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

Negative coverage: loan_not_required_by_parameter / alias-ty RFC 1214 / premise loan_not_required_by_parameters(env, assumptions, outlives, loan, parameters) => ()

Premise at line 1432. Observed failure causes: failed_judgment.

alias-ty RFC 1214
LineCoverageSource
143218(loan_not_required_by_parameters(env, assumptions, outlives, loan, parameters) => ())
──────── ("alias-ty RFC 1214")
14343(loan_not_required_by_parameter(env, assumptions, outlives, loan, AliasTy { name: _, parameters }) => ())

18 tests failed proving this premise:


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

fn foo() -> Datum {
    exists<'r0, 'r1> {
        let x: Datum = Datum { value: 0_u32 };
        let r: &'r0 Datum = &'r1 x;
        let y: Datum = x;
        return *r;
    }
}
Failed proof tree

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

fn foo() -> i32 {
    exists<'r0, 'r1> {
        let v1: i32 = 0_i32;
        let v2: &'r0 mut i32 = &'r1 mut v1;
        // This should result in an error
        v1 = 1_i32;
        return *v2;
    }
}
Failed proof tree

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

fn foo() -> i32 {
    exists<'r0, 'r1> {
        let v1: i32 = 0_i32;
        let v2: &'r0 i32 = &'r1 v1;
        v1 = 1_i32;
        return *v2;
    }
}
Failed proof tree

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

fn foo() -> i32 {
    exists<'r> {
        let v3: i32 = 0_i32;
        let v4: &'r i32 = &'r v3;
    }
    exists<'r0, 'r1> {
        let v1: i32 = 0_i32;
        let v2: &'r0 i32 = &'r1 v1;
        v1 = 1_i32;
        return *v2;
    }
}
Failed proof tree

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

fn foo() -> i32 {
    exists<'r0, 'r1> {
        let v2: &'r0 i32;
        {
            let v1: i32 = 0_i32;
            v2 = &'r1 v1;
        }
        return *v2;
    }
}
Failed proof tree

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

fn foo() -> i32 {
    exists<'r0, 'r1> {
        let v2: &'r0 mut i32;
        {
            let v1: i32 = 0_i32;
            v2 = &'r1 mut v1;
        }
        return *v2;
    }
}
Failed proof tree

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

fn foo() -> i32 {
    exists<'r0, 'r1> {
        let v2: &'r0 i32;
        'a: {
            let v1: i32 = 0_i32;
            v2 = &'r1 v1;
            break 'a;
        }
        return *v2;
    }
}
Failed proof tree

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

fn foo() -> i32 {
    exists<'r0, 'r1> {
        let r: &'r0 i32;
        'a: loop {
            let x: i32 = 0_i32;
            r = &'r1 x;
            break 'a;
        }
        return *r;
    }
}
Failed proof tree

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

fn foo() -> u32 {
    exists<'r0, 'r1> {
        let a: u32 = 22_u32;
        let p: &'r0 u32 = &'r1 a;
        'l: loop {
            if true {
                a = 23_u32;
                continue 'l;
            } else {
                break 'l;
            }
        }
        return *p;
    }
}
Failed proof tree

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

fn foo() -> u32 {
    exists<'r0, 'r1, 'r2> {
        let a: u32 = 22_u32;
        let b: u32 = 22_u32;
        let p: &'r0 u32 = &'r1 a;
        a = 23_u32;
        'l: loop {
            p = &'r2 b;
            break 'l;
        }
        return *p;
    }
}
Failed proof tree

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

fn bar() -> u32 {
    exists<'r0, 'r1, 'r2> {
        let v: u32 = 0_u32;
        let p: &'r0 u32 = &'r1 v;
        let _: u32 = foo::<'r2>(&'r2 mut v);
        return *p;
    }
}

Proof trees omitted for the remaining 8 tests; each one is on its test’s page in Coverage by test.


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

fn foo() -> u32 {
    exists<'r0, 'r1> {
        let p: Point = Point { x: 0_u32, y: 0_u32 };
        let b1: &'r0 mut u32 = &'r1 mut p.x;
        p.x = 1_u32;
        return *b1;
    }
}

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

fn foo() -> u32 {
    exists<'r0, 'r1> {
        let v1: u32 = 22_u32;
        let v2: &'r0 mut u32 = &'r1 mut v1;
        let w: Wrapper = Wrapper { value: v1 };
        return *v2;
    }
}

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

fn foo() -> u32 {
    exists<'r0> {
        let v1: u32 = 0_u32;
        let w: Wrapper<'r0> = Wrapper::<'r0> { value: &'r0 mut v1 };
        v1 = 1_u32;
        return *(w.value);
    }
}

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

fn foo() -> () {
    let x: u32 = 1_u32;
    exists<'r0> {
        let r: &'r0 u32 = &'r0 x;
        x += 1_u32;
        let y: u32 = *r;
    }
}

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

fn foo() -> () {
    let x: u32 = 1_u32;
    exists<'a> {
        let r: &'a mut u32 = &'a mut x;
        x = x + *r;
    }
}

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

fn foo() -> () {
    let x: u32 = 1_u32;
    exists<'a> {
        let r: &'a mut u32 = &'a mut x;
        x += *r;
        let y: u32 = *r;
    }
}

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

fn foo() -> () {
    let x: u32 = 1_u32;
    exists<'a> {
        let r: &'a mut u32 = &'a mut x;
        *r += x;
    }
}

How to read this page