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_wc / const has ty / premise prove_after(decls, c, assumptions, Relation::equals(ty_constant, ty)) => c

Premise at line 168. Observed failure causes: failed_judgment.

const has ty
LineCoverageSource
1671(prove_const_has_type(decls, env, assumptions, constant) => (ty_constant, c))
1681(prove_after(decls, c, assumptions, Relation::equals(ty_constant, ty)) => c)
──────── ("const has ty")
1703(prove_wc(decls, env, assumptions, Predicate::ConstHasType(constant, ty)) => c)

1 test failed proving this premise:


Source location: tests/consts.rs:32

#[test]
fn mismatch() {
    FormalityTest::new(crates![crate Foo {
                trait Foo<const C> where type_of_const C is bool {}

                impl Foo<u32(42)> for u32 {}
            }]).err(expect_test::expect![[r#"
                crates/formality-rust/src/prove/prove/prove/prove_normalize.rs:19:1: no applicable rules for prove_normalize { p: u32, assumptions: {}, env: Env { variables: [], bias: Soundness, pending: [], allow_pending_outlives: false } }

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

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