Positive coverage: prove_predicate / forall
forall| Line | Coverage | Source |
|---|---|---|
| 34 | ✗ | (scope(enter_universally_with_constraints(env, binder) => (env, p1)) with(c) (prove_predicate(decls, env, assumptions, p1) => c)) |
| ──────── ("forall") | ||
| 37 | 14 | (prove_predicate(decls, env, assumptions, Predicate::ForAll(binder)) => c) |
14 tests exercised this rule:
Source location: crates/formality-rust/src/prove/test/eq_assumptions.rs:15 (all coverage from this test)
#[test]
fn test_a() {
test_prove(
Program::empty(),
term("{} => {for<T, U> if {T = u32, U = Vec<T>} U = Vec<u32>}"),
)
.assert_ok(expect!["{Constraints { env: Env { variables: [], bias: Soundness, pending: [], allow_pending_outlives: false }, known_true: true, substitution: {} }}"]);
}
Proof tree
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (implies)prove_predicate.rs:42args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (normalize-l)prove_eq.rs:70args
prove_normalize (normalize-via-assumption)prove_normalize.rs:37args
prove_normalize_via (axiom-l)prove_normalize.rs:98args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (rigid)prove_eq.rs:48args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (assumption)prove_predicate.rs:49args
prove_via (relation-axiom)prove_via.rs:43args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
Source location: crates/formality-rust/src/prove/test/eq_assumptions.rs:24 (all coverage from this test)
#[test]
fn test_b() {
test_prove(
Program::empty(),
term("exists<A> {} => {for<T, U> if {T = u32, U = Vec<T>} A = U}"),
)
.assert_ok(expect!["{Constraints { env: Env { variables: [?ty_2, ?ty_1], bias: Soundness, pending: [], allow_pending_outlives: false }, known_true: true, substitution: {?ty_1 => Vec<u32>, ?ty_2 => u32} }}"]);
}
Proof tree
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (implies)prove_predicate.rs:42args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (normalize-l)prove_eq.rs:70args
prove_normalize (normalize-via-assumption)prove_normalize.rs:37args
prove_normalize_via (axiom-l)prove_normalize.rs:98args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-nonvar)prove_eq.rs:96args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (normalize-l)prove_eq.rs:70args
prove_normalize (normalize-via-assumption)prove_normalize.rs:37args
prove_normalize_via (axiom-l)prove_normalize.rs:98args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-nonvar)prove_eq.rs:96args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
Source location: crates/formality-rust/src/prove/test/eq_assumptions.rs:33 (all coverage from this test)
#[test]
fn test_normalize_assoc_ty() {
test_prove(
Program::empty(),
term("{} => {for<T> if { <T as Iterator>::Item = u32 } <T as Iterator>::Item = u32}"),
)
.assert_ok(expect!["{Constraints { env: Env { variables: [], bias: Soundness, pending: [], allow_pending_outlives: false }, known_true: true, substitution: {} }}"]);
}
Proof tree
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (implies)prove_predicate.rs:42args
prove_predicate (assumption)prove_predicate.rs:49args
prove_via (relation-axiom)prove_via.rs:43args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
Source location: crates/formality-rust/src/prove/test/eq_partial_eq.rs:25 (all coverage from this test)
#[test]
fn eq_implies_partial_eq() {
let assumptions: Predicates = Predicates::t();
let goal: Predicate = term("for<T> if {Eq(T)} PartialEq(T)");
let constraints = prove(decls(), (), assumptions, goal);
constraints.assert_ok(
expect!["{Constraints { env: Env { variables: [], bias: Soundness, pending: [], allow_pending_outlives: false }, known_true: true, substitution: {} }}"]);
}
Proof tree
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (implies)prove_predicate.rs:42args
prove_predicate (trait implied bound)prove_predicate.rs:110args
scopeprove_predicate.rs:22prove_via (predicate-congruence-axiom)prove_via.rs:33args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (assumption)prove_predicate.rs:49args
prove_via (predicate-congruence-axiom)prove_via.rs:33args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
Source location: crates/formality-rust/src/prove/test/universes.rs:37 (all coverage from this test)
#[test]
fn for_t_exists_u() {
let decls = Program {
crates: Arc::new(Program::program_from_items(vec![
term("trait Test<T> where {}"),
term("impl<X> Test<X> for X {}"),
])),
..Program::empty()
};
test_prove(decls, term("{} => {for<T> Test(T, T)}")).assert_ok(expect!["{Constraints { env: Env { variables: [], bias: Soundness, pending: [], allow_pending_outlives: false }, known_true: true, substitution: {} }}"]);
}
Proof tree
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (positive impl)prove_predicate.rs:79args
scopeprove_predicate.rs:22prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
Source location: tests/basic_tests.rs:74 (all coverage from this test)
#[test]
fn basic_where_clauses_pass() {
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> { }
impl <T> B for T {}
}])
.skip_execute()
.ok()
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:76args
for_allmod.rs:61for_allmod.rs:73args
check_crate_item (feature gate)mod.rs:225args
for_allmod.rs:73args
check_crate_item (trait)mod.rs:189args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (trait well formed)prove_predicate.rs:131args
for_allcombinators.rs:69prove_wf (universal variables)prove_wf.rs:27args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (trait)mod.rs:189args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (trait)mod.rs:189args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (trait well formed)prove_predicate.rs:131args
for_allcombinators.rs:69prove_wf (integers and booleans)prove_wf.rs:56args
for_allcombinators.rs:69prove_wf (universal variables)prove_wf.rs:27args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (positive impl)prove_predicate.rs:79args
scopeprove_predicate.rs:22prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (trait impl)mod.rs:196args
check_trait_impl (check_trait_impl)impls.rs:40args
scopeimpls.rs:14prove_predicate_list (none)prove_predicate_list.rs:21args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (positive impl)prove_predicate.rs:79args
scopeprove_predicate.rs:22prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
check_safety_matches (safety matches)impls.rs:83args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:342args
check_coherence (check_coherence)coherence.rs:23args
for_allcoherence.rs:7for_allcoherence.rs:16args
for_allcoherence.rs:7for_allcoherence.rs:17args
overlap_check_impl (same impl)coherence.rs:73args
for_allcoherence.rs:7for_allcoherence.rs:19args
orphan_check (orphan_check)coherence.rs:38args
scopecoherence.rs:30prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (trait ref is local)prove_predicate.rs:137args
is_local_trait_ref (local trait)is_local.rs:217args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
Source location: tests/basic_tests.rs:121 (all coverage from this test)
fn foo() -> () where for<T> u32: A<T> { trusted }
impl <T> B for T {}
}])
p_execute()
)
}
#[test]
ifetime_binder_in_fn_where_clause_fail() {
alityTest::new(crates![crate core {
trait A<T> where T: B { }
trait B { }
fn foo() -> () where for<T> u32: A<T> { trusted }
}])
(expect_test::expect![[r#"
the rule "check crate" at (mod.rs) failed because
non lifetime binders require #![feature(non_lifetime_binders)]"#]])
}
#[test]
ifetime_binder_in_trait_impl_where_clause_pass() {
alityTest::new(crates![crate core {
#![feature(non_lifetime_binders)]
trait A<T> where T: B { }
trait B { }
impl<T> B for T where for<U> u32: A<U> { }
}])
p_execute()
)
}
#[test]
ifetime_binder_in_trait_impl_where_clause_fail() {
alityTest::new(crates![crate core {
trait A<T> where T: B { }
trait B { }
impl<T> B for T where for<U> u32: A<U> { }
}])
(expect_test::expect![[r#"
the rule "check crate" at (mod.rs) failed because
non lifetime binders require #![feature(non_lifetime_binders)]"#]])
}
#[test]
ifetime_binder_in_neg_trait_impl_where_clause_pass() {
alityTest::new(crates![crate core {
#![feature(non_lifetime_binders)]
trait A<T> where T: B { }
trait B { }
impl<T> !A<T> for u32 where for<U> u32: A<U> { }
impl <T> B for T {}
}])
p_execute()
)
}
#[test]
ifetime_binder_in_neg_trait_impl_where_clause_fail() {
alityTest::new(crates![crate core {
trait A<T> where T: B { }
trait B { }
impl<T> !A<T> for u32 where for<U> u32: A<U> { }
}])
(expect_test::expect![[r#"
the rule "check crate" at (mod.rs) failed because
non lifetime binders require #![feature(non_lifetime_binders)]"#]])
}
#[test]
ifetime_binder_in_enum_where_clause_pass() {
alityTest::new(crates![crate core {
#![feature(non_lifetime_binders)]
trait A<T> where T: B { }
trait B { }
enum E where for<U> u32: A<U> { }
impl <T> B for T {}
}])
p_execute()
)
}
#[test]
ifetime_binder_in_enum_where_clause_fail() {
alityTest::new(crates![crate core {
trait A<T> where T: B { }
trait B { }
enum E where for<U> u32: A<U> { }
}])
(expect_test::expect![[r#"
the rule "check crate" at (mod.rs) failed because
non lifetime binders require #![feature(non_lifetime_binders)]"#]])
}
#[test]
ifetime_binder_in_struct_where_clause_pass() {
alityTest::new(crates![crate core {
#![feature(non_lifetime_binders)]
trait A<T> where T: B { }
trait B { }
struct S<T> where for<U> u32: A<U> { }
impl <T> B for T {}
}])
p_execute()
)
}
#[test]
ifetime_binder_in_struct_where_clause_fail() {
alityTest::new(crates![crate core {
trait A<T> where T: B { }
trait B { }
struct S<T> where for<U> u32: A<U> { }
}])
(expect_test::expect![[r#"
the rule "check crate" at (mod.rs) failed because
non lifetime binders require #![feature(non_lifetime_binders)]"#]])
}
#[test]
ime_binder_in_where_clause_without_feature_pass() {
alityTest::new(crates![crate core {
trait A<'b> { }
impl<'b> A<'b> for u32 { }
trait WellFormed where for<'b> u32: A<'b> { }
}])
p_execute()
)
}
#[test]
_adt_variant_dup() {
alityTest::new(crates![crate Foo {
enum Bar {
Baz{},
Baz{},
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:76args
for_allmod.rs:61for_allmod.rs:73args
check_crate_item (feature gate)mod.rs:225args
for_allmod.rs:73args
check_crate_item (trait)mod.rs:189args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (trait well formed)prove_predicate.rs:131args
for_allcombinators.rs:69prove_wf (universal variables)prove_wf.rs:27args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (trait)mod.rs:189args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (free fn)mod.rs:208args
check_free_fn (check free fn)fns.rs:25args
check_fn (check fn)fns.rs:55args
scopefns.rs:31prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (trait well formed)prove_predicate.rs:131args
for_allcombinators.rs:69prove_wf (integers and booleans)prove_wf.rs:56args
for_allcombinators.rs:69prove_wf (universal variables)prove_wf.rs:27args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (positive impl)prove_predicate.rs:79args
scopeprove_predicate.rs:22prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (parameter well formed)prove_predicate.rs:150args
prove_wf (tuples)prove_wf.rs:50args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
check_fn_body (trusted fn body)fns.rs:81args
for_allmod.rs:73args
check_crate_item (trait impl)mod.rs:196args
check_trait_impl (check_trait_impl)impls.rs:40args
scopeimpls.rs:14prove_predicate_list (none)prove_predicate_list.rs:21args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (positive impl)prove_predicate.rs:79args
scopeprove_predicate.rs:22prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
check_safety_matches (safety matches)impls.rs:83args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:342args
check_coherence (check_coherence)coherence.rs:23args
for_allcoherence.rs:7for_allcoherence.rs:16args
for_allcoherence.rs:7for_allcoherence.rs:17args
overlap_check_impl (same impl)coherence.rs:73args
for_allcoherence.rs:7for_allcoherence.rs:19args
orphan_check (orphan_check)coherence.rs:38args
scopecoherence.rs:30prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (trait ref is local)prove_predicate.rs:137args
is_local_trait_ref (local trait)is_local.rs:217args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
Source location: tests/basic_tests.rs:149 (all coverage from this test)
#[test]
fn non_lifetime_binder_in_trait_impl_where_clause_pass() {
FormalityTest::new(crates![crate core {
#![feature(non_lifetime_binders)]
trait A<T> where T: B { }
trait B { }
impl<T> B for T where for<U> u32: A<U> { }
}])
.skip_execute()
.ok()
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:76args
for_allmod.rs:61for_allmod.rs:73args
check_crate_item (feature gate)mod.rs:225args
for_allmod.rs:73args
check_crate_item (trait)mod.rs:189args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (trait well formed)prove_predicate.rs:131args
for_allcombinators.rs:69prove_wf (universal variables)prove_wf.rs:27args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (trait)mod.rs:189args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (trait impl)mod.rs:196args
check_trait_impl (check_trait_impl)impls.rs:40args
scopeimpls.rs:14prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (trait well formed)prove_predicate.rs:131args
for_allcombinators.rs:69prove_wf (integers and booleans)prove_wf.rs:56args
for_allcombinators.rs:69prove_wf (universal variables)prove_wf.rs:27args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (positive impl)prove_predicate.rs:79args
scopeprove_predicate.rs:22prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (assumption)prove_predicate.rs:49args
prove_via (forall)prove_via.rs:52args
scopeprove_via.rs:9prove_via (predicate-congruence-axiom)prove_via.rs:33args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (positive impl)prove_predicate.rs:79args
scopeprove_predicate.rs:22prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (assumption)prove_predicate.rs:49args
prove_via (forall)prove_via.rs:52args
scopeprove_via.rs:9prove_via (predicate-congruence-axiom)prove_via.rs:33args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
check_safety_matches (safety matches)impls.rs:83args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:342args
check_coherence (check_coherence)coherence.rs:23args
for_allcoherence.rs:7for_allcoherence.rs:16args
for_allcoherence.rs:7for_allcoherence.rs:17args
overlap_check_impl (same impl)coherence.rs:73args
for_allcoherence.rs:7for_allcoherence.rs:19args
orphan_check (orphan_check)coherence.rs:38args
scopecoherence.rs:30prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (trait ref is local)prove_predicate.rs:137args
is_local_trait_ref (local trait)is_local.rs:217args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
Source location: tests/basic_tests.rs:179 (all coverage from this test)
#[test]
fn non_lifetime_binder_in_neg_trait_impl_where_clause_pass() {
FormalityTest::new(crates![crate core {
#![feature(non_lifetime_binders)]
trait A<T> where T: B { }
trait B { }
impl<T> !A<T> for u32 where for<U> u32: A<U> { }
impl <T> B for T {}
}])
.skip_execute()
.ok()
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:76args
for_allmod.rs:61for_allmod.rs:73args
check_crate_item (feature gate)mod.rs:225args
for_allmod.rs:73args
check_crate_item (trait)mod.rs:189args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (trait well formed)prove_predicate.rs:131args
for_allcombinators.rs:69prove_wf (universal variables)prove_wf.rs:27args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (trait)mod.rs:189args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (neg trait impl)mod.rs:214args
check_neg_trait_impl (check_neg_trait_impl)impls.rs:68args
scopeimpls.rs:46prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (trait well formed)prove_predicate.rs:131args
for_allcombinators.rs:69prove_wf (integers and booleans)prove_wf.rs:56args
for_allcombinators.rs:69prove_wf (universal variables)prove_wf.rs:27args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (positive impl)prove_predicate.rs:79args
scopeprove_predicate.rs:22prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (negative impl)prove_predicate.rs:95args
scopeprove_predicate.rs:22prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (assumption)prove_predicate.rs:49args
prove_via (forall)prove_via.rs:52args
scopeprove_via.rs:9prove_via (predicate-congruence-axiom)prove_via.rs:33args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (trait impl)mod.rs:196args
check_trait_impl (check_trait_impl)impls.rs:40args
scopeimpls.rs:14prove_predicate_list (none)prove_predicate_list.rs:21args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (positive impl)prove_predicate.rs:79args
scopeprove_predicate.rs:22prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
check_safety_matches (safety matches)impls.rs:83args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:342args
check_coherence (check_coherence)coherence.rs:23args
for_allcoherence.rs:7for_allcoherence.rs:16args
for_allcoherence.rs:7for_allcoherence.rs:17args
overlap_check_impl (same impl)coherence.rs:73args
for_allcoherence.rs:7for_allcoherence.rs:19args
orphan_check (orphan_check)coherence.rs:38args
scopecoherence.rs:30prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (trait ref is local)prove_predicate.rs:137args
is_local_trait_ref (local trait)is_local.rs:217args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
for_allcoherence.rs:7for_allcoherence.rs:21args
orphan_check_neg (orphan_check_neg)coherence.rs:58args
scopecoherence.rs:44prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (trait ref is local)prove_predicate.rs:137args
is_local_trait_ref (local trait)is_local.rs:217args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
Source location: tests/basic_tests.rs:209 (all coverage from this test)
#[test]
fn non_lifetime_binder_in_enum_where_clause_pass() {
FormalityTest::new(crates![crate core {
#![feature(non_lifetime_binders)]
trait A<T> where T: B { }
trait B { }
enum E where for<U> u32: A<U> { }
impl <T> B for T {}
}])
.skip_execute()
.ok()
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:76args
for_allmod.rs:61for_allmod.rs:73args
check_crate_item (feature gate)mod.rs:225args
for_allmod.rs:73args
check_crate_item (trait)mod.rs:189args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (trait well formed)prove_predicate.rs:131args
for_allcombinators.rs:69prove_wf (universal variables)prove_wf.rs:27args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (trait)mod.rs:189args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (adt)mod.rs:202args
check_adt (check adt)adts.rs:26args
scopeadts.rs:11prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (forall)prove_predicate.rs:36args
scopeprove_predicate.rs:22prove_predicate (trait well formed)prove_predicate.rs:131args
for_allcombinators.rs:69prove_wf (integers and booleans)prove_wf.rs:56args
for_allcombinators.rs:69prove_wf (universal variables)prove_wf.rs:27args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (positive impl)prove_predicate.rs:79args
scopeprove_predicate.rs:22prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (trait impl)mod.rs:196args
check_trait_impl (check_trait_impl)impls.rs:40args
scopeimpls.rs:14prove_predicate_list (none)prove_predicate_list.rs:21args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (positive impl)prove_predicate.rs:79args
scopeprove_predicate.rs:22prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:116args
prove_eq (symmetric)prove_eq.rs:39args
prove_eq (existential)prove_eq.rs:63args
prove_existential_var_eq (existential-universal)prove_eq.rs:141args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
check_safety_matches (safety matches)impls.rs:83args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:342args
check_coherence (check_coherence)coherence.rs:23args
for_allcoherence.rs:7for_allcoherence.rs:16args
for_allcoherence.rs:7for_allcoherence.rs:17args
overlap_check_impl (same impl)coherence.rs:73args
for_allcoherence.rs:7for_allcoherence.rs:19args
orphan_check (orphan_check)coherence.rs:38args
scopecoherence.rs:30prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (trait ref is local)prove_predicate.rs:137args
is_local_trait_ref (local trait)is_local.rs:217args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
Source location: tests/basic_tests.rs:239 (all coverage from this test)
#[test]
fn non_lifetime_binder_in_struct_where_clause_pass() {
FormalityTest::new(crates![crate core {
#![feature(non_lifetime_binders)]
trait A<T> where T: B { }
trait B { }
struct S<T> where for<U> u32: A<U> { }
impl <T> B for T {}
}])
.skip_execute()
.ok()
}
Proof trees omitted for the remaining 4 tests; each one is on its test’s page in Coverage by test.
Source location: tests/basic_tests.rs:266 (all coverage from this test)
#[test]
fn lifetime_binder_in_where_clause_without_feature_pass() {
FormalityTest::new(crates![crate core {
trait A<'b> { }
impl<'b> A<'b> for u32 { }
trait WellFormed where for<'b> u32: A<'b> { }
}])
.skip_execute()
.ok()
}
Source location: tests/consts.rs:131 (all coverage from this test)
#[test]
fn nested_const_bound_accepts_outer_parameter() {
FormalityTest::new(crates![crate Foo {
trait Foo<const C> where for<'a> type_of_const C is bool {}
}])
.skip_execute()
.ok()
}
Source location: tests/consts.rs:141 (all coverage from this test)
#[test]
fn nested_const_bound_accepts_inner_parameter() {
FormalityTest::new(crates![crate Foo {
#![feature(non_lifetime_binders)]
trait Foo where for<const C> type_of_const C is bool {}
}])
.skip_execute()
.ok()
}