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: is_not_downstream / via normalize / premise prove_normalize(decls, env, assumptions, parameter) => Constrained(p, c1)

Premise at line 262. Observed failure causes: failed_judgment.

via normalize
LineCoverageSource
2621(prove_normalize(decls, env, assumptions, parameter) => Constrained(p, c1))
263N/A(let assumptions = c1.substitution().apply(assumptions))
264(is_not_downstream(decls, c1.env(), assumptions, p) => c2)
──────── ("via normalize")
2661(is_not_downstream(decls, env, assumptions, parameter) => c1.seq(c2))

1 test failed proving this premise:


Source location: tests/coherence_orphan.rs:109

#[test]
fn uncovered_T() {
    FormalityTest::new(crates![crate core {
                trait CoreTrait<T> {}
            },
            crate foo {
                struct FooStruct {}
                impl<T> CoreTrait<FooStruct> for T {}
            }]).err(expect_test::expect![[r#"
            crates/formality-rust/src/prove/prove/prove/prove_normalize.rs:19: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/prove/prove_normalize.rs:19:1: no applicable rules for prove_normalize { p: !ty_0, assumptions: {}, env: Env { variables: [!ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }

            the rule "local trait" at (is_local.rs) failed because
              condition evaluated to false: `decls.is_local_trait_id(&goal.trait_id)`
                decls = program([crate core { trait CoreTrait <ty, ty> { } }, crate foo { struct FooStruct { } impl <ty> CoreTrait <FooStruct> for ^ty0_0 { } }], 222)
                &goal.trait_id = CoreTrait"#]])
}
Failed proof tree