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: prove_predicate_list / some / premise prove_after(decls, c, assumptions, wcs1) => c

Premise at line 27. Observed failure causes: failed_judgment.

some
LineCoverageSource
2692(prove_predicate(decls, env, assumptions, wc0) => c)
275(prove_after(decls, c, assumptions, wcs1) => c)
──────── ("some")
29363(prove_predicate_list(decls, env, assumptions, Cons(wc0, wcs1)) => c)

5 tests failed proving this premise:


Source location: crates/formality-rust/src/prove/test/occurs_check.rs:48 (all coverage from this test)

#[test]
fn indirect_cycle_1() {
    test_prove(decls(), term("exists<A, B> {} => {A = Vec<B>, B = A}")).assert_err(expect![[r#"
        failed at (proven_set.rs) because
          `?ty_0` occurs in `Vec<?ty_0>`

        crates/formality-rust/src/prove/prove_normalize.rs:22:1: no applicable rules for prove_normalize { p: ?ty_0, assumptions: {}, env: Env { variables: [?ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }

        crates/formality-rust/src/prove/prove_normalize.rs:22:1: no applicable rules for prove_normalize { p: Vec<?ty_0>, assumptions: {}, env: Env { variables: [?ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }"#]]);
}
Failed proof tree

Source location: crates/formality-rust/src/prove/test/occurs_check.rs:60 (all coverage from this test)

#[test]
fn indirect_cycle_2() {
    test_prove(decls(), term("exists<A, B> {} => {B = A, A = Vec<B>}")).assert_err(expect![[r#"
        failed at (proven_set.rs) because
          `?ty_0` occurs in `Vec<?ty_0>`

        crates/formality-rust/src/prove/prove_normalize.rs:22:1: no applicable rules for prove_normalize { p: ?ty_0, assumptions: {}, env: Env { variables: [?ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }

        crates/formality-rust/src/prove/prove_normalize.rs:22:1: no applicable rules for prove_normalize { p: Vec<?ty_0>, assumptions: {}, env: Env { variables: [?ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }"#]]);
}
Failed proof tree

Source location: tests/higher_ranked_where_clauses.rs:87 (all coverage from this test)

fn foo<'b, T>() -> () where T: Trait<'b> {
    needs_all::<T>();
}
Failed proof tree

Source location: tests/outlives.rs:42 (all coverage from this test)

#[test]
fn assoc_type_impl_violates_static_bound() {
    FormalityTest::new(crates![crate Foo {
        trait A { type Item: ['static]; }
        impl<'a> A for &'a u32 { type Item = &'a u32; }
    }])
    .skip_execute()
    .rustc_err(expect_test::expect![[r#"
        error[E0477]: the type `&'a00 u32` does not fulfill the required lifetime
         --> lib.rs
          |
        6 |     type Item = &'a00 u32;
          |                 ^^^^^^^^^
          |
        note: type must satisfy the static lifetime as required by this binding
         --> lib.rs
          |
        2 |     type Item: 'static;
          |                ^^^^^^^

        For more information about this error, try `rustc --explain E0477`.
        error: could not compile `Foo` (lib) due to 1 previous error
    "#]])
    .err(expect_test::expect!["crates/formality-rust/src/prove/prove_outlives.rs:8:1: no applicable rules for prove_outlives { a: !lt_0, b: ' static, assumptions: {}, env: Env { variables: [!lt_0], bias: Soundness, pending: [], allow_pending_outlives: false } }"]);
}
Failed proof tree

Source location: tests/sized_trait.rs:174 (all coverage from this test)

#[test]
fn tuple_requires_every_element_sized() {
    // In rustc, `(T, bool)` isn't even well-formed if `T` is unsized.
    FormalityTest::new(crates![crate Foo {
        trait Needs<T> where T: Sized {}
        impl<T> Needs<(T, bool)> for u32 {}
    }])
    .rustc_ok()
    .err(expect_test::expect![[r#"
        crates/formality-rust/src/prove/prove_sized.rs:12:1: no applicable rules for prove_sized { ty: !ty_0, assumptions: {}, env: Env { variables: [!ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }

        the rule "trait implied bound" at (prove_predicate.rs) failed because
          expression evaluated to an empty collection: `decls.trait_invariants()`

        the rule "trait implied bound" at (prove_predicate.rs) failed because
          expression evaluated to an empty collection: `decls.trait_invariants()`

        the rule "trait implied bound" at (prove_predicate.rs) failed because
          expression evaluated to an empty collection: `decls.trait_invariants()`"#]]);
}
Failed proof tree

How to read this page