Test basic_where_clauses_fail
Source location: tests/basic_tests.rs:85
#[test]
fn basic_where_clauses_fail() {
FormalityTest::new(crates![crate core {
#![feature(non_lifetime_binders)]
trait A<T> where T: B { }
trait B { }
trait WellFormed where for<T> u32: A<T> { }
}]).err(expect_test::expect![[r#"
crates/formality-rust/src/prove/prove_via.rs:9:1: no applicable rules for prove_via { goal: @ WellFormedTraitRef(A(u32, !ty_1)), via: A(u32, ?ty_2), assumptions: {for <ty> A(u32, ^ty0_0)}, env: Env { variables: [!ty_1, ?ty_2], bias: Soundness, pending: [], allow_pending_outlives: false } }
crates/formality-rust/src/prove/prove_via.rs:9:1: no applicable rules for prove_via { goal: B(!ty_0), via: A(u32, ?ty_1), assumptions: {for <ty> A(u32, ^ty0_0)}, env: Env { variables: [!ty_0, ?ty_1], 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 (11)
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_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 74, blamed at line 75) | not counted by the judgment view |
| check_crate_item | trait | check_trait(program, Env::default(), v, crate_id… (line 189) | 7 tests |
| check_trait | check trait | scope(enter_universally(env, &binder.explicit_bi… (line 20, blamed at line 22) | not counted by the judgment view |
| prove_after | prove_after | prove(decls, c1.env(), assumptions, goal) => c2 (line 19) | 28 tests |
| prove_predicate | forall | scope(enter_universally_with_constraints(decls, … (line 35, blamed at line 36) | 4 tests |
| prove_predicate | assumption | prove_via(decls, env, assumptions, a, goal) => c (line 49) | 35 tests |
| prove_predicate | trait implied bound | ti in decls.trait_invariants() (line 115) | 28 tests |
| prove_predicate | trait well formed | prove_after(decls, c, assumptions, &t.where_clau… (line 139) | 2 tests |
| prove_predicate_list | some | prove_predicate(decls, env, assumptions, wc0) =>… (line 26) | 92 tests |
| prove_via | forall | scope(enter_existentially_with_constraints(decls… (line 49, blamed at line 51) | not counted by the judgment view |
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:75check_crate_item failedmod.rs:180args
rule "trait"mod.rs:189check_trait failedtraits.rs:9args
rule "check trait"traits.rs:22prove failedfunction.rs:250args
rulefunction.rs:250prove_predicate_list failedprove_predicate_list.rs:8args
rule "some"prove_predicate_list.rs:26prove_predicate failedprove_predicate.rs:23args
rule "forall"prove_predicate.rs:36prove_predicate failedprove_predicate.rs:23args
rule "assumption"prove_predicate.rs:49prove_via failedprove_via.rs:9args
rule "forall"prove_via.rs:51prove_via failedprove_via.rs:9args
rule "trait well formed"prove_predicate.rs:139prove_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:23args
rule "assumption"prove_predicate.rs:49prove_via failedprove_via.rs:9args
rule "forall"prove_via.rs:51prove_via failedprove_via.rs:9args
rule "trait implied bound"prove_predicate.rs:115 (failed: empty_collection)