Negative coverage: is_local_trait_ref / local parameter / premise for_all(decls, env, assumptions, &goal.parameters[..*i], &is_not_downstream) => c2
Premise at line 220. Observed failure causes: failed_judgment.
local parameter| Line | Coverage | Source |
|---|---|---|
| 214 | ✗ | (i in 0 .. goal.parameters.len()) |
| 215 | 6 | (is_local_parameter(decls, env, assumptions, &goal.parameters[*i]) => c1) |
| 218 | N/A | (let assumptions = c1.substitution().apply(assumptions)) |
| 219 | N/A | (let goal = c1.substitution().apply(goal)) |
| 220 | 1 | (for_all(decls, env, assumptions, &goal.parameters[..*i], &is_not_downstream) => c2) |
| ──────── ("local parameter") | ||
| 222 | 11 | (is_local_trait_ref(decls, env, assumptions, goal) => 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_normalize.rs:20: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:20: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
check_all_crates failedmod.rs:41args
rule "check all prefixes"mod.rs:53check_crate failedmod.rs:60args
rule "check crate"mod.rs:74check_coherence failedcoherence.rs:8args
rule "check_coherence"coherence.rs:21orphan_check failedcoherence.rs:31args
rule "orphan_check"coherence.rs:38prove failedfunction.rs:250args
rulefunction.rs:250prove_wc_list failedprove_wc_list.rs:8args
rule "some"prove_wc_list.rs:26prove_wc failedprove_wc.rs:21args
rule "trait ref is local"prove_wc.rs:146is_local_trait_ref failedis_local.rs:197args
rule "local parameter"is_local.rs:220is_not_downstream failedis_local.rs:227args
rule "via normalize"is_local.rs:258prove_normalize failedprove_normalize.rs:20args