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| Line | Coverage | Source |
|---|---|---|
| 56 | N/A | (let (env, a) = Env::default().instantiate_universally(&impl_a.binder)) |
| 57 | N/A | (let trait_ref = a.trait_ref()) |
| 58 | 1 | (prove_goal(program, env, &a.where_clauses, Predicate::is_local(trait_ref)) => ()) |
| ──────── ("orphan_check_neg") | ||
| 60 | 3 | (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
check_all_crates failedmod.rs:41rule "check all prefixes"mod.rs:53check_crate failedmod.rs:60rule "check crate"mod.rs:74check_coherence failedcoherence.rs:8rule "check_coherence"coherence.rs:23orphan_check_neg failedcoherence.rs:45rule "orphan_check_neg"coherence.rs:58prove failedfunction.rs:250rulefunction.rs:250prove_wc_list failedprove_wc_list.rs:11rule "some"prove_wc_list.rs:29prove_wc failedprove_wc.rs:23rule "trait ref is local"prove_wc.rs:148is_local_trait_ref failedis_local.rs:201rule "local parameter"is_local.rs:219is_local_parameter failedis_local.rs:279rule "fundamental rigid type"is_local.rs:300 (failed: if_false)rule "local parameter"is_local.rs:291prove_normalize failedprove_normalize.rs:19
rule "local rigid type"is_local.rs:308 (failed: if_false)
rule "local trait"is_local.rs:211 (failed: if_false)