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: orphan_check_neg / orphan_check_neg / premise prove_goal(program, env, &a.where_clauses, Predicate::is_local(trait_ref)) => ()

Premise at line 58. Observed failure causes: failed_judgment.

orphan_check_neg
LineCoverageSource
56N/A(let (env, a) = Env::default().instantiate_universally(&impl_a.binder))
57N/A(let trait_ref = a.trait_ref())
581(prove_goal(program, env, &a.where_clauses, Predicate::is_local(trait_ref)) => ())
──────── ("orphan_check_neg")
603(orphan_check_neg(program, impl_a) => ())

1 test failed proving this premise:


Source location: tests/coherence_orphan.rs:12

#[test]
fn neg_CoreTrait_for_CoreStruct_in_Foo() {
    FormalityTest::new(crates![crate core {
                trait CoreTrait {}
                struct CoreStruct {}
            },
            crate foo {
                impl !CoreTrait for CoreStruct {}
            }]).err(expect_test::expect![[r#"
            the rule "fundamental rigid type" at (is_local.rs) failed because
              condition evaluated to false: `is_fundamental(decls, name)`
                decls = program([crate core { trait CoreTrait <ty> { } struct CoreStruct { } }, crate foo { impl ! CoreTrait for CoreStruct {} }], 222)
                name = (adt CoreStruct)

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

            the rule "local rigid type" at (is_local.rs) failed because
              condition evaluated to false: `decls.is_local_adt_id(a)`
                decls = program([crate core { trait CoreTrait <ty> { } struct CoreStruct { } }, crate foo { impl ! CoreTrait for CoreStruct {} }], 222)
                a = CoreStruct

            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> { } struct CoreStruct { } }, crate foo { impl ! CoreTrait for CoreStruct {} }], 222)
                &goal.trait_id = CoreTrait"#]])
}
Failed proof tree