Test mismatch
Source location: tests/consts.rs:36
#[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_normalize.rs:22: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_normalize.rs:22: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_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`"#]])
}
Rules proved (0)
This test records no positive coverage.
Premises failed (12)
The last column links to the premise’s page when the judgment view counts this failure against that premise. It does not when the premise is read as infallible, or when the failure was blamed inside a multi-line premise that carries no record on its own first line.
| Judgment | Rule | Premise | All tests of this premise |
|---|---|---|---|
| check_trait_impl | check_trait_impl | scope(enter_universally(Env::default(), binder) … (line 23, blamed at line 27) | not counted by the judgment view |
| check_all_crates | check all prefixes | for_all(i in 0..crates.len()) (let program = cra… (line 52, blamed at line 54) | not counted by the judgment view |
| check_crate | check crate | for_all(item in &c.items) (check_crate_item(prog… (line 73, blamed at line 74) | not counted by the judgment view |
| check_crate_item | trait impl | check_trait_impl(program, v, crate_id) => () (line 194) | 16 tests |
| prove_after | prove_after | prove(decls, c1.env(), assumptions, goal) => c2 (line 19) | 21 tests |
| prove_eq | symmetric | prove_eq(decls, env, assumptions, r, l) => env_c (line 38) | 17 tests |
| prove_eq | normalize-l | prove_normalize(decls, env, assumptions, x) => C… (line 68) | 17 tests |
| prove_predicate | positive impl | scope(enter_existentially_with_constraints(env, … (line 60, blamed at line 78) | not counted by the judgment view |
| prove_predicate | trait implied bound | ti in decls.trait_invariants() (line 106) | 19 tests |
| prove_predicate | eq | prove_eq(decls, env, assumptions, a, b) => c (line 115) | 17 tests |
| prove_predicate | const has ty | prove_after(decls, c, assumptions, AtomicPredica… (line 156) | 1 test |
| prove_predicate_list | some | prove_predicate(decls, env, assumptions, wc0) =>… (line 26) | 67 tests |
Proof trees
Failed proof tree
check_all_crates failedmod.rs:42args
rule "check all prefixes"mod.rs:54check_crate failedmod.rs:61args
rule "check crate"mod.rs:74check_crate_item failedmod.rs:179rule "trait impl"mod.rs:194check_trait_impl failedimpls.rs:14rule "check_trait_impl"impls.rs:27prove failedfunction.rs:250args
rulefunction.rs:250prove_predicate_list failedprove_predicate_list.rs:8args
rule "some"prove_predicate_list.rs:26prove_predicate failedprove_predicate.rs:22args
rule "positive impl"prove_predicate.rs:78prove_after failedprove_after.rs:8args
rule "prove_after"prove_after.rs:19prove failedprove_after.rs:19args
ruleprove_after.rs:19prove_predicate_list failedprove_predicate_list.rs:8args
rule "some"prove_predicate_list.rs:26prove_predicate failedprove_predicate.rs:22args
rule "const has ty"prove_predicate.rs:156prove_after failedprove_after.rs:8args
rule "prove_after"prove_after.rs:19prove failedprove_after.rs:19args
ruleprove_after.rs:19prove_predicate_list failedprove_predicate_list.rs:8args
rule "some"prove_predicate_list.rs:26prove_predicate failedprove_predicate.rs:22args
rule "eq"prove_predicate.rs:115prove_eq failedprove_eq.rs:23args
rule "normalize-l"prove_eq.rs:68prove_normalize failedprove_normalize.rs:22args
rule "symmetric"prove_eq.rs:38prove_eq failedprove_eq.rs:23args
rule "normalize-l"prove_eq.rs:68prove_normalize failedprove_normalize.rs:22args
rule "trait implied bound"prove_predicate.rs:106 (failed: empty_collection)