Positive coverage: borrow_check_expr / call
call| Line | Coverage | Source |
|---|---|---|
| 494 | 12 | (borrow_check_expr( env, assumptions, state, callee, args.live_before(env, &state, places_live), ) => (callee_ty, state)) |
| 503 | ✗ | (prove_ty_is_rigid(env, assumptions, state, callee_ty) => (RigidTy { name: RigidName::FnDef(fn_id), parameters }, state)) |
| 506 | ✗ | (let Fn { id: _, safety, binder } = env.crates().fn_named(fn_id)?) |
| 508 | ✗ | (ProvenSet::singleton((safety, ProofTree::leaf("safety"))) => Safety::Safe) |
| 509 | ✗ | (let FnBoundData { input_args, output_ty, where_clauses, body: _ } = binder.instantiate_with(parameters)?) |
| 513 | 1 | (if input_args.len() == args.len()) |
| 515 | ✗ | (for_all(i in 0..args.len()) with(state) (borrow_check_expr_has_ty(env, assumptions, state, &args[i], &input_args[i].ty, args[i+1..].live_before(env, &state, places_live)) => state)) |
| 518 | ✗ | (prove_where_clauses(env, assumptions, state, where_clauses) => state) |
| ──────── ("call") | ||
| 520 | 82 | (borrow_check_expr(env, assumptions, state, Expr::Call { callee, args }, places_live) => (output_ty, state)) |
82 tests exercised this rule:
Source location: tests/borrowck.rs:2829 (all coverage from this test)
fn main() -> () {
let x: u32 = 22_u32;
exists<'r0, 'r1> {
let r: &'r0 u32 = &'r0 x;
let s: &'r1 u32 = first::<'r1>(r);
println!(*s);
}
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:77args
for_allmod.rs:61for_allmod.rs:74args
check_crate_item (trait)mod.rs:190args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
Source location: tests/borrowck.rs:3590 (all coverage from this test)
fn foo<'a>(a: &'a u32) -> &'a u32 {
exists<'r0> {
let r: &'r0 u32 = identity::<&'r0 u32>(a);
return r;
}
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:77args
for_allmod.rs:61for_allmod.rs:74args
check_crate_item (trait)mod.rs:190args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
Source location: tests/borrowck.rs:3612 (all coverage from this test)
fn bar() -> u32 {
exists<'r1> {
let v: u32 = 7_u32;
let r: u32 = foo::<'r1>(&'r1 v);
return r;
}
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:77args
for_allmod.rs:61for_allmod.rs:74args
check_crate_item (trait)mod.rs:190args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
Source location: tests/borrowck.rs:3642 (all coverage from this test)
fn foo<'a, 'b>(a: &'a u32) -> &'b u32
where
'a: 'b,
{
let r: &'b u32 = identity::<&'b u32>(a);
return r;
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:77args
for_allmod.rs:61for_allmod.rs:74args
check_crate_item (trait)mod.rs:190args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
Source location: tests/borrowck.rs:3690 (all coverage from this test)
fn foo<'b>(a: &'b u32) -> &'b u32 {
let r: &'b u32 = bar::<'b, &'b u32>(a);
return r;
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:77args
for_allmod.rs:61for_allmod.rs:74args
check_crate_item (trait)mod.rs:190args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
Source location: tests/borrowck.rs:3711 (all coverage from this test)
fn bar() -> u32 {
exists<'r0, 'r1> {
let v: u32 = 1_u32;
let p: &'r0 u32 = &'r1 v;
foo(0_u32);
return *p;
}
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:77args
for_allmod.rs:61for_allmod.rs:74args
check_crate_item (trait)mod.rs:190args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
Source location: tests/borrowck.rs:4364 (all coverage from this test)
fn remove_last_node_recursive<'a>(node: &'a mut List) -> u32 {
exists<'r0> {
let next: &'r0 mut List = next_of::<'r0>(&'r0 mut *node);
if true {
remove_last_node_recursive::<'r0>(next);
} else {
*node = List { value: 0_u32 };
}
return 0_u32;
}
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:77args
for_allmod.rs:61for_allmod.rs:74args
check_crate_item (trait)mod.rs:190args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
Source location: tests/borrowck.rs:4473 (all coverage from this test)
fn no_control_flow() -> u32 {
exists<'r0, 'r1, 'r2, 'r3> {
let b: X = X { value: 0_u32 };
let p: &'r0 mut X = &'r1 mut b;
'l: loop {
let now: &'r2 mut X = &'r2 mut *p;
if true {
let next: &'r3 mut X = next_of::<'r3>(&'r3 mut *now);
p = next;
} else {
break 'l;
}
}
return 0_u32;
}
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:77args
for_allmod.rs:61for_allmod.rs:74args
check_crate_item (trait)mod.rs:190args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
Source location: tests/borrowck.rs:4523 (all coverage from this test)
fn conditional() -> u32 {
exists<'r0, 'r1, 'r2, 'r3> {
let b: X = X { value: 0_u32 };
let p: &'r0 mut X = &'r1 mut b;
'l: loop {
let now: &'r2 mut X = &'r2 mut *p;
if true {
if true {
let next: &'r3 mut X = next_of::<'r3>(&'r3 mut *now);
p = next;
} else {
}
} else {
break 'l;
}
}
return 0_u32;
}
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:77args
for_allmod.rs:61for_allmod.rs:74args
check_crate_item (trait)mod.rs:190args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
Source location: tests/borrowck.rs:4612 (all coverage from this test)
fn conditional_with_indirection() -> u32 {
exists<'r0, 'r1, 'r2, 'r3> {
let b: X = X { value: 0_u32 };
let p: &'r0 mut X = &'r1 mut b;
'l: loop {
let now: &'r2 mut X = &'r2 mut *p;
if true {
if true {
let next: &'r3 mut X = next_of::<'r3>(&'r3 mut *p);
p = next;
} else {
}
} else {
break 'l;
}
}
return 0_u32;
}
}
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:77args
for_allmod.rs:61for_allmod.rs:74args
check_crate_item (trait)mod.rs:190args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
check_crate_item (trait impl)mod.rs:197args
check_trait_impl (check_trait_impl)impls.rs:41args
scopeimpls.rs:14check_trait_manually_implementable (not Sized)impls.rs:92args
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:80args
scopeprove_predicate.rs:23prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (eq)prove_predicate.rs:125args
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:107args
check_drop_impl_always_applicable (not a Drop impl)impls.rs:366args
for_allmod.rs:74args
Source location: tests/borrowck.rs:4664 (all coverage from this test)
fn to_refs<'a>(list: &'a mut List) -> &'a mut u32 {
exists<'r0, 'r1> {
let result: &'a mut u32;
'l: loop {
result = &'r0 mut (*list).value;
if true {
let n: &'r1 mut List = next_from_field::<'r1>(&'r1 mut (*list).next);
list = n;
} else {
return result;
}
}
}
}
Proof trees omitted for the remaining 72 tests; each one is on its test’s page in Coverage by test.
Source location: tests/borrowck.rs:4699 (all coverage from this test)
fn to_refs2<'a>(list: &'a mut List) -> &'a mut u32 {
exists<'r0, 'r1> {
let result: &'a mut u32;
'l: loop {
result = &'r0 mut (*list).value;
if true {
let n: &'r1 mut List = next_from_field::<'r1>(&'r1 mut (*list).next);
list = n;
} else {
break 'l;
}
}
return result;
}
}
Source location: tests/borrowck.rs:4746 (all coverage from this test)
fn to_refs3<'a>(list: &'a mut List) -> &'a mut u32 {
exists<'r0, 'r1> {
let result: &'a mut u32;
let cursor: &'a mut List = &'a mut *list;
'l: loop {
result = &'r0 mut (*cursor).value;
if true {
let n: &'r1 mut List = next_from_field::<'r1>(&'r1 mut (*cursor).next);
cursor = n;
} else {
return result;
}
}
}
}
Source location: tests/borrowck.rs:4789 (all coverage from this test)
fn next<'a>(d: &'a mut Decoder) -> &'a u32 {
exists<'r0, 'r1> {
'l: loop {
let buf: &'r0 u32 = fill_buf::<'r0>(&'r0 mut (*d).buf_read);
let s: &'r1 u32 = decode::<'r1>(buf);
if true {
return s;
} else {
}
}
}
}
Source location: tests/borrowck.rs:4912 (all coverage from this test)
fn next<'s>(f: &'s mut Filter) -> &'s mut u32 {
exists<'r0, 'r1, 'r2> {
'l: loop {
let item: &'r0 mut u32 = iter_next::<'r0>(&'r0 mut (*f).iter);
if true {
let keep: bool = call_predicate::<'r1, 'r2>(&'r1 mut (*f).predicate, &'r2 *item);
if keep {
return item;
} else {
}
} else {
break 'l;
}
}
return no_item::<'s>();
}
}
Source location: tests/borrowck.rs:5028 (all coverage from this test)
fn use_it<'a, 'b>() -> u32 {
exists<'r0> {
let v: Invariant<'r0> = create_invariant::<'r0>();
if true {
return sink::<'a, 'r0>(v);
} else {
return sink::<'b, 'r0>(v);
}
}
}
Source location: tests/borrowck.rs:5093 (all coverage from this test)
fn use_it_but_its_the_same_region<'a, 'b>() -> u32 where 'a: 'b, 'b: 'a {
exists<'r0> {
let v: Invariant<'r0> = create_invariant::<'r0>();
if true {
return sink::<'a, 'r0>(v);
} else {
return sink::<'b, 'r0>(v);
}
}
}
Source location: tests/borrowck.rs:5597 (all coverage from this test)
fn f() -> u32 {
exists<'r0> {
let v: u32 = 0_u32;
let x: u32 = cb::<'r0>(v, &'r0 mut v);
return x;
}
}
Source location: tests/borrowck.rs:5620 (all coverage from this test)
fn f() -> u32 {
exists<'r0, 'r1> {
let v: u32 = 0_u32;
let x: u32 = ss::<'r0, 'r1>(&'r0 v, &'r1 v);
return x;
}
}
Source location: tests/borrowck.rs:5644 (all coverage from this test)
fn f() -> u32 {
exists<'r0, 'r1> {
let s: S = S { a: 0_u32, b: 0_u32 };
let x: u32 = both::<'r0, 'r1>(&'r0 mut s.a, &'r1 mut s.b);
return x;
}
}
Source location: tests/borrowck.rs:5670 (all coverage from this test)
fn f() -> u32 {
exists<'r0, 'r1> {
let v: u32 = 0_u32;
let w: u32 = 0_u32;
let r: &'r0 u32 = &'r0 w;
let x: u32 = pair::<'r1, 'r0>(&'r1 mut v, r);
return x;
}
}
Source location: tests/codegen.rs:159 (all coverage from this test)
fn main() -> () {
let y: i32 = add_one(1_i32);
println!(y);
}
Source location: tests/codegen.rs:174 (all coverage from this test)
fn main() -> () {
let y: i32 = identity::<i32>(42_i32);
println!(y);
}
Source location: tests/codegen.rs:282 (all coverage from this test)
fn main() -> () {
let a: i32 = f(1_i32);
let b: i32 = f(2_i32);
let c: i32 = f(3_i32);
println!(a);
println!(b);
println!(c);
}
Source location: tests/codegen.rs:295 (all coverage from this test)
fn main() -> () {
let y: i32 = f(f(42_i32));
println!(y);
}
Source location: tests/codegen.rs:312 (all coverage from this test)
fn main() -> () {
let r: i32 = outer(7_i32);
println!(r);
}
Source location: tests/codegen.rs:332 (all coverage from this test)
fn main() -> () {
a();
}
Source location: tests/codegen.rs:345 (all coverage from this test)
fn main() -> () {
let r: i32 = first::<i32, bool>(10_i32, true);
println!(r);
}
Source location: tests/codegen.rs:586 (all coverage from this test)
fn main() -> () {
let x: u32 = 1_u32;
exists<'a> {
let r: &'a mut u32 = &'a mut x;
let amount: u32 = update::<'a>(r);
println!(amount);
}
}
Source location: tests/codegen.rs:628 (all coverage from this test)
fn main() -> () {
println!(identity::<S>(7_u32));
}
Source location: tests/codegen.rs:640 (all coverage from this test)
fn main() -> () { println!(left() + right()); }
}])
tc_ok()
ect_output("1\n2\n30\n")
)
}
#[test]
ion_in_call_arguments() {
alityTest::new(crates![crate test {
fn sum(x: i32, y: i32) -> i32 { return x + y; }
fn main() -> () {
println!(sum(1_i32 + 2_i32, sum(3_i32, 4_i32)));
}
Source location: tests/codegen.rs:653 (all coverage from this test)
fn main() -> () {
println!(sum(1_i32 + 2_i32, sum(3_i32, 4_i32)));
}
Source location: tests/codegen.rs:693 (all coverage from this test)
fn main() -> () {
let s: S = S { b: second(), a: first() };
println!(s.a);
println!(s.b);
}
Source location: tests/codegen.rs:769 (all coverage from this test)
fn main() -> () { println!(left() - right()); }
}])
tc_ok()
ect_output("1\n2\n7\n")
);
}
#[test]
er_subtraction_unsigned() {
alityTest::new(crates![crate Foo {
fn main() -> () {
println!(10_u32 - 3_u32);
}
Source location: tests/codegen.rs:927 (all coverage from this test)
fn main() -> () {
println!(identity::<Number>(7_u32));
println!(identity::<Flag>(true));
println!(identity::<Number>(9_u32));
}
Source location: tests/codegen.rs:964 (all coverage from this test)
fn main() -> () {
let x: u32 = 1_u32;
exists<'a> {
let r: &'a mut u32 = &'a mut x;
x += update::<'a>(r);
}
println!(x);
}
Source location: tests/codegen.rs:1000 (all coverage from this test)
fn main() -> () { println!(left() * right()); }
}])
tc_ok()
ect_output("1\n2\n12\n")
);
}
#[test]
plication_with_parentheses() {
alityTest::new(crates![crate Foo {
fn main() -> () {
println!((2_i32 + 3_i32) * 4_i32);
println!(2_i32 * (3_i32 + 4_i32));
}
Source location: tests/codegen.rs:1196 (all coverage from this test)
fn main() -> () { println!(left() ^ right()); }
}])
tc_ok()
ect_output("1\n2\n6\n")
);
}
#[test]
se_xor_with_parentheses() {
alityTest::new(crates![crate Foo {
fn main() -> () {
println!((1_i32 ^ 2_i32) + 3_i32);
println!(2_i32 * (3_i32 ^ 5_i32));
}
Source location: tests/codegen.rs:1258 (all coverage from this test)
fn main() -> () {
let x: u32 = 1_u32;
exists<'a> {
let r: &'a mut u32 = &'a mut x;
x ^= update::<'a>(r);
}
println!(x);
}
Source location: tests/codegen.rs:1363 (all coverage from this test)
fn main() -> () { println!(left() | right()); }
}])
tc_ok()
ect_output("1\n2\n5\n")
);
}
#[test]
se_or_with_parentheses() {
alityTest::new(crates![crate Foo {
fn main() -> () {
println!((1_i32 | 2_i32) ^ 3_i32);
println!(2_i32 * (1_i32 | 4_i32));
}
Source location: tests/codegen.rs:1425 (all coverage from this test)
fn main() -> () {
let x: u32 = 2_u32;
exists<'a> {
let r: &'a mut u32 = &'a mut x;
x |= update::<'a>(r);
}
println!(x);
}
Source location: tests/codegen.rs:1534 (all coverage from this test)
fn main() -> () { println!(left() & right()); }
}])
tc_ok()
ect_output("1\n2\n8\n")
);
}
#[test]
se_and_with_parentheses() {
alityTest::new(crates![crate Foo {
fn main() -> () {
println!((5_i32 ^ 6_i32) & 3_i32);
println!((6_i32 & 3_i32) * 2_i32);
}
Source location: tests/codegen.rs:1596 (all coverage from this test)
fn main() -> () {
let x: u32 = 1_u32;
exists<'a> {
let r: &'a mut u32 = &'a mut x;
x &= update::<'a>(r);
}
println!(x);
}
Source location: tests/codegen.rs:1652 (all coverage from this test)
fn main() -> () {
let x: u32 = 12_u32;
exists<'a, 'b> {
let r: &'a u32 = &'a x;
println!(and_left::<'a>(r));
let s: &'b u32 = &'b x;
println!(and_right::<'b>(s));
}
}
Source location: tests/codegen.rs:1772 (all coverage from this test)
fn main() -> () { println!(left() % right()); }
}])
tc_ok()
ect_output("1\n2\n1\n")
);
}
panics on these; MiniRust reports them as undefined behavior.
#543: assert a defined abort instead of accepting the MiniRust UB diagnostic.
#[test]
_panic(expected = "modulus of remainder is zero")]
er_remainder_by_zero() {
alityTest::new(crates![crate Foo {
fn main() -> () {
println!(7_i32 % 0_i32);
}
Source location: tests/codegen.rs:1820 (all coverage from this test)
fn main() -> () {
let p: Pair = Pair { left: 8_u32, right: 16_u32 };
exists<'a> {
let r: &'a mut Pair = &'a mut p;
p.left %= update::<'a>(r);
}
println!(p.left);
println!(p.right);
}
Source location: tests/codegen.rs:1962 (all coverage from this test)
fn main() -> () { println!(left() / right()); }
}])
tc_ok()
ect_output("1\n2\n4\n")
);
}
ust reports invalid division as an execution error.
#543: assert a defined abort instead of accepting the MiniRust UB diagnostic.
#[test]
_panic(expected = "division by zero")]
er_division_by_zero() {
alityTest::new(crates![crate Foo {
fn main() -> () {
println!(12_i32 / 0_i32);
}
Source location: tests/codegen.rs:2056 (all coverage from this test)
fn main() -> () {
println!(sum(12_i32 / 3_i32, 10_i32 / 2_i32));
}
Source location: tests/consts.rs:166 (all coverage from this test)
Source location: tests/consts.rs:196 (all coverage from this test)
Source location: tests/consts.rs:208 (all coverage from this test)
Source location: tests/consts.rs:220 (all coverage from this test)
Source location: tests/division_abort.rs:40 (all coverage from this test)
#[test]
#[should_panic(expected = "expected a defined abort, got Ub(String(\"division by zero\"))")]
fn division_by_zero_aborts() {
assert_aborts(crates![crate Foo {
fn divide(lhs: u32, rhs: u32) -> u32 { return lhs / rhs; }
fn main() -> () { println!(divide(12_u32, 0_u32)); }
}]);
}
Source location: tests/division_abort.rs:50 (all coverage from this test)
#[test]
#[should_panic(expected = "expected a defined abort, got Ub(String(\"overflow in division\"))")]
fn signed_division_overflow_aborts() {
assert_aborts(crates![crate Foo {
fn divide(lhs: i32, rhs: i32) -> i32 { return lhs / rhs; }
fn main() -> () { println!(divide(-2147483648_i32, -1_i32)); }
}]);
}
Source location: tests/division_abort.rs:60 (all coverage from this test)
#[test]
#[should_panic(expected = "expected a defined abort, got Ub(String(\"division by zero\"))")]
fn compound_division_by_zero_aborts() {
assert_aborts(crates![crate Foo {
fn divide(lhs: u32, rhs: u32) -> u32 {
lhs /= rhs;
return lhs;
}
fn main() -> () { println!(divide(12_u32, 0_u32)); }
}]);
}
Source location: tests/division_abort.rs:73 (all coverage from this test)
#[test]
#[should_panic(expected = "expected a defined abort, got Ub(String(\"overflow in division\"))")]
fn signed_compound_division_overflow_aborts() {
assert_aborts(crates![crate Foo {
fn divide(lhs: i32, rhs: i32) -> i32 {
lhs /= rhs;
return lhs;
}
fn main() -> () { println!(divide(-2147483648_i32, -1_i32)); }
}]);
}
Source location: tests/functions.rs:70 (all coverage from this test)
fn main() {
helper();
}
Source location: tests/higher_ranked_where_clauses.rs:28 (all coverage from this test)
fn foo<T>() -> () where for<'a> T: Trait<'a> {
exists<'r> {
needs_one::<'r, T>();
}
}
Source location: tests/higher_ranked_where_clauses.rs:42 (all coverage from this test)
fn foo<'b, T>() -> () where for<'a> T: Trait<'a> {
needs_one::<'b, T>();
}
Source location: tests/higher_ranked_where_clauses.rs:56 (all coverage from this test)
fn foo<T>() -> () where for<'a> T: Trait<'a> {
needs_all::<T>();
}
Source location: tests/higher_ranked_where_clauses.rs:118 (all coverage from this test)
fn foo<T>() -> u32 where for<'a> T: Trait<'a> {
let v: u32 = 1_u32;
exists<'r> {
let r: &'r u32 = first::<'r, T>(&'r v);
let n: u32 = *r;
v = 2_u32;
return n;
}
}
Source location: tests/higher_ranked_where_clauses.rs:176 (all coverage from this test)
fn foo<T>() -> () where for<'a> T: 'a {
needs_static::<T>();
}
Source location: tests/higher_ranked_where_clauses.rs:189 (all coverage from this test)
fn foo<'x, T>() -> () where for<'a> T: 'a {
needs_one::<'x, T>();
}
Source location: tests/higher_ranked_where_clauses.rs:202 (all coverage from this test)
fn foo<T>() -> () where for<'a> T: 'a {
needs_all::<T>();
}
Source location: tests/mir_typeck.rs:193 (all coverage from this test)
fn bar(v1: u32) -> u32 {
let v0: u32 = foo(v1);
return v0;
}
Source location: tests/mir_typeck.rs:439 (all coverage from this test)
fn bar(v1: u32) -> u32 {
let v0: u32 = identity::<u32>(v1);
return v0;
}
Source location: tests/mir_typeck.rs:1896 (all coverage from this test)
fn main() -> () { outer::<u32>(); }
}])
tc_ok()
);
}
#[test]
bare_fn_value_with_satisfied_where_clause() {
alityTest::new(crates![crate Foo {
trait Marker {}
impl Marker for u32 {}
fn require() -> () where u32: Marker {}
fn main() -> () { require; }
}])
tc_ok()
);
}
#[test]
fn_value_with_forwarded_lifetime_bound() {
alityTest::new(crates![crate Foo {
fn require<'a, 'b>() -> () where 'a: 'b {}
fn outer<'a, 'b>() -> () where 'a: 'b { require::<'a, 'b>; }
fn main() -> () { outer::<'static, 'static>(); }
}])
tc_ok()
);
}
#[test]
fn_value_with_unsatisfied_lifetime_bound() {
alityTest::new(crates![crate Foo {
fn require<'a, 'b>() -> () where 'a: 'b {}
fn outer<'a, 'b>() -> () { require::<'a, 'b>; }
fn main() -> () {}
}])
tc_err(expect_test::expect![[r#"
error: lifetime may not live long enough
--> lib.rs
|
7 | pub fn outer<'a00, 'a01>() -> () {
| ---- ---- lifetime `'a01` defined here
| |
| lifetime `'a00` defined here
8 | require::<'a00, 'a01>;
| ^^^^^^^^^^^^^^^^^^^^^ requires that `'a00` must outlive `'a01`
|
= help: consider adding the following bound: `'a00: 'a01`
error: could not compile `Foo` (lib) due to 1 previous error
)
(expect_test::expect!["crates/formality-rust/src/prove/prove_outlives.rs:8:1: no applicable rules for prove_outlives { a: !lt_0, b: !lt_1, assumptions: {}, env: Env { variables: [!lt_0, !lt_1], bias: Soundness, pending: [], allow_pending_outlives: false } }"]);
}
ound assignment of an integer of a different type should fail.
#[test]
compound_add_mismatched_int_types() {
alityTest::new(crates![crate Foo {
fn foo() -> () {
let x: u32 = 1_u32;
x += 2_u8;
}
Source location: tests/mir_typeck.rs:1919 (all coverage from this test)
fn main() -> () { outer::<'static, 'static>(); }
}])
tc_ok()
);
}
#[test]
fn_value_with_unsatisfied_lifetime_bound() {
alityTest::new(crates![crate Foo {
fn require<'a, 'b>() -> () where 'a: 'b {}
fn outer<'a, 'b>() -> () { require::<'a, 'b>; }
fn main() -> () {}
}])
tc_err(expect_test::expect![[r#"
error: lifetime may not live long enough
--> lib.rs
|
7 | pub fn outer<'a00, 'a01>() -> () {
| ---- ---- lifetime `'a01` defined here
| |
| lifetime `'a00` defined here
8 | require::<'a00, 'a01>;
| ^^^^^^^^^^^^^^^^^^^^^ requires that `'a00` must outlive `'a01`
|
= help: consider adding the following bound: `'a00: 'a01`
error: could not compile `Foo` (lib) due to 1 previous error
)
(expect_test::expect!["crates/formality-rust/src/prove/prove_outlives.rs:8:1: no applicable rules for prove_outlives { a: !lt_0, b: !lt_1, assumptions: {}, env: Env { variables: [!lt_0, !lt_1], bias: Soundness, pending: [], allow_pending_outlives: false } }"]);
}
ound assignment of an integer of a different type should fail.
#[test]
compound_add_mismatched_int_types() {
alityTest::new(crates![crate Foo {
fn foo() -> () {
let x: u32 = 1_u32;
x += 2_u8;
}
Source location: tests/mir_typeck.rs:2160 (all coverage from this test)
fn main() -> () {
let v0: u32 = 0_u32;
exists<'r> {
let v1: &'r u32 = &'r v0;
needs_all::<&'r u32>(v1);
v0 = 1_u32;
}
}
Source location: tests/mir_typeck.rs:2176 (all coverage from this test)
fn caller<'x>(v: &'x u32) -> () where 'x: 'static {
needs_all::<&'x u32>(v);
}
Source location: tests/outlives.rs:83 (all coverage from this test)
fn caller<'a, T>() -> () where T: A, <T as A>::Item: 'a {
needs_outlives::<'a, T>();
}
Source location: tests/pr502_liveness_prototypes.rs:26 (all coverage from this test)
fn f() -> () {
exists<'r0, 'r1> {
let v: u32 = 0_u32;
let w: u32 = 1_u32;
let r: &'r0 u32 = &'r0 v;
pair::<'r1, 'r0>(&'r1 mut v, after_reset::<'r0>(r = &'r0 w, r));
}
}
Source location: tests/pr502_liveness_prototypes.rs:134 (all coverage from this test)
fn f() -> () {
exists<'r0, 'r1> {
let v: u32 = 0_u32;
let r: &'r0 u32 = &'r0 v;
let p: Pair<'r1> = Pair::<'r1> { a: *r, b: &'r1 mut v };
println!(p.a);
}
}
Source location: tests/pr531_review_probes.rs:39 (all coverage from this test)
fn main() -> () {
let p: Pair = Pair { left: 2_u32, right: 16_u32 };
exists<'a> {
let r: &'a mut Pair = &'a mut p;
p.left |= update::<'a>(r);
}
println!(p.left);
println!(p.right);
}
Source location: tests/pr531_review_probes.rs:55 (all coverage from this test)
fn main() -> () {
let x: u128 = 170141183460469231731687303715884105728_u128;
x |= identity(1_u128 | 2_u128 ^ 3_u128);
println!(x);
println!(identity((1_u128 | 2_u128) ^ 3_u128));
}
Source location: tests/pr539_review_probes.rs:16 (all coverage from this test)
fn main() -> () {
println!(identity(8_u32 | 6_u32 ^ 3_u32 & 1_u32));
println!(identity((8_u32 | 6_u32 ^ 3_u32) & 1_u32));
println!(identity(0_u32 & observed()));
}
Source location: tests/pr539_review_probes.rs:39 (all coverage from this test)
fn main() -> () {
let p: Pair = Pair { left: 1_u32, right: 16_u32 };
exists<'a> {
let r: &'a mut Pair = &'a mut p;
p.left &= update::<'a>(r);
}
println!(p.left);
println!(p.right);
}
Source location: tests/sized_trait.rs:44 (all coverage from this test)
fn main() -> () { consume::<u32>(22_u32); }
}])
tc_ok()
)
}
#[test]
d_reference_is_sized_without_pointee_bound() {
alityTest::new(crates![crate Foo {
trait Needs<T> where T: Sized {}
impl<'a, T> Needs<&'a T> for u32 where T: 'a {}
fn main() -> () {}
}])
tc_ok()
);
}
#[test]
le_reference_is_sized_without_pointee_bound() {
alityTest::new(crates![crate Foo {
trait Needs<T> where T: Sized {}
impl<'a, T> Needs<&'a mut T> for u32 where T: 'a {}
fn main() -> () {}
}])
tc_ok()
);
}
#[test]
ic_sized_bound_is_forwarded() {
alityTest::new(crates![crate Foo {
trait Needs<T> where T: Sized {}
impl<T> Needs<T> for u32 where T: Sized {}
fn main() -> () {}
}])
tc_ok()
);
}
#[test]
ic_parameter_requires_explicit_sized_bound() {
enerated Rust still gives T an implicit Sized bound until #500 lands.
ormality must already require an explicit bound on this impl.
alityTest::new(crates![crate Foo {
trait Needs<T> where T: Sized {}
impl<T> Needs<T> for u32 {}
}])
tc_ok()
(expect_test::expect![[r#"
crates/formality-rust/src/prove/prove_sized.rs:12:1: no applicable rules for prove_sized { ty: !ty_0, assumptions: {}, env: Env { variables: [!ty_0], 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()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`"#]]);
}
#[test]
defined_sized_impl_is_rejected() {
alityTest::new(crates![crate Foo {
struct S {}
impl Sized for S {}
}])
tc_err(expect_test::expect![[r#"
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> lib.rs
|
3 | impl Sized for S {}
| ^^^^^^^^^^^^^^^^ impl of `Sized` not allowed
For more information about this error, try `rustc --explain E0322`.
error: could not compile `Foo` (lib) due to 1 previous error
)
(expect_test::expect![[r#"
the rule "Sized" at (impls.rs) failed because
explicit impls for the `Sized` trait are not permitted"#]]);
}
#[test]
defined_negative_sized_impl_is_rejected() {
alityTest::new(crates![crate Foo {
#![feature(negative_impls)]
struct S {}
impl !Sized for S {}
}])
tc_err(expect_test::expect![[r#"
error[E0322]: explicit impls for the `Sized` trait are not permitted
--> lib.rs
|
5 | impl !Sized for S {}
| ^^^^^^^^^^^^^^^^^ impl of `Sized` not allowed
For more information about this error, try `rustc --explain E0322`.
error: could not compile `Foo` (lib) due to 1 previous error
)
(expect_test::expect![[r#"
the rule "Sized" at (impls.rs) failed because
explicit impls for the `Sized` trait are not permitted"#]]);
}
#[test]
ointers_are_sized_without_pointee_bound() {
alityTest::new(crates![crate Foo {
trait Needs<T> where T: Sized {}
impl<T> Needs<*const T> for u32 {}
impl<T> Needs<*mut T> for u32 {}
fn main() -> () {}
}])
tc_ok()
);
}
#[test]
and_tuples_of_sized_types_are_sized() {
alityTest::new(crates![crate Foo {
trait Needs<T> where T: Sized {}
impl Needs<()> for u32 {}
impl<T> Needs<(T, bool)> for u32 where T: Sized {}
fn main() -> () {}
}])
tc_ok()
);
}
#[test]
_requires_every_element_sized() {
n rustc, `(T, bool)` isn't even well-formed if `T` is unsized.
alityTest::new(crates![crate Foo {
trait Needs<T> where T: Sized {}
impl<T> Needs<(T, bool)> for u32 {}
}])
tc_ok()
(expect_test::expect![[r#"
crates/formality-rust/src/prove/prove_sized.rs:12:1: no applicable rules for prove_sized { ty: !ty_0, assumptions: {}, env: Env { variables: [!ty_0], 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()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`"#]]);
}
#[test]
t_with_generic_tail_is_sized_if_tail_is() {
alityTest::new(crates![crate Foo {
struct Tail<T> { prefix: u32, tail: T }
trait Needs<T> where T: Sized {}
impl<T> Needs<Tail<T>> for u32 where T: Sized {}
fn main() -> () {}
}])
tc_ok()
);
}
#[test]
t_with_generic_tail_requires_sized_tail() {
Tail<T>` is only sized if `T` is.
alityTest::new(crates![crate Foo {
struct Tail<T> { prefix: u32, tail: T }
trait Needs<T> where T: Sized {}
impl<T> Needs<Tail<T>> for u32 {}
}])
tc_ok()
(expect_test::expect![[r#"
crates/formality-rust/src/prove/prove_sized.rs:12:1: no applicable rules for prove_sized { ty: !ty_0, assumptions: {}, env: Env { variables: [!ty_0], 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()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`"#]]);
}
#[test]
_non_final_field_is_accepted() {
alityTest::new(crates![crate Foo {
struct Good<T> where T: Sized { prefix: T, tail: u32 }
fn main() -> () {}
}])
tc_ok()
);
}
#[test]
ed_non_final_field_is_rejected() {
nly the last field of a struct can be unsized.
alityTest::new(crates![crate Foo {
struct Bad<T> { prefix: T, tail: u32 }
}])
tc_ok()
(expect_test::expect![[r#"
crates/formality-rust/src/prove/prove_sized.rs:12:1: no applicable rules for prove_sized { ty: !ty_0, assumptions: {}, env: Env { variables: [!ty_0], 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()`"#]]);
}
#[test]
with_sized_fields_is_sized() {
alityTest::new(crates![crate Foo {
enum Maybe<T> where T: Sized { Just { value: T }, Nothing {} }
trait Needs<T> where T: Sized {}
impl<T> Needs<Maybe<T>> for u32 where T: Sized {}
fn main() -> () {}
}])
tc_ok()
);
}
#[test]
ed_enum_field_is_rejected() {
num fields must all be sized, even the last one.
alityTest::new(crates![crate Foo {
enum Maybe<T> { Nothing {}, Just { value: T } }
}])
tc_ok()
(expect_test::expect![[r#"
crates/formality-rust/src/prove/prove_sized.rs:12:1: no applicable rules for prove_sized { ty: !ty_0, assumptions: {}, env: Env { variables: [!ty_0], 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()`"#]]);
}
#[test]
_is_sized_if_normalized_type_is() {
alityTest::new(crates![crate Foo {
trait Assoc { type Out: []; }
impl Assoc for u32 { type Out = bool; }
trait Needs<T> where T: Sized {}
impl Needs<<u32 as Assoc>::Out> for u32 {}
fn main() -> () {}
}])
tc_ok()
);
}
#[test]
ction_non_final_field_with_sized_bound_is_accepted() {
he solver ignores bounds on associated types, so `type A: [Sized]` wouldn't help.
alityTest::new(crates![crate Foo {
trait Tr { type A: []; }
struct S<T> where T: Tr, <T as Tr>::A: Sized { a: <T as Tr>::A, b: u32 }
fn main() -> () {}
}])
tc_ok()
);
}
#[test]
et_impl_for_sized_types_overlaps_with_impl_for_struct() {
S` is sized, so both impls apply to it.
alityTest::new(crates![crate Foo {
trait Foo {}
struct S {}
impl<T> Foo for T where T: Sized {}
impl Foo for S {}
}])
tc_err(expect_test::expect![[r#"
error[E0119]: conflicting implementations of trait `Foo` for type `S`
--> lib.rs
|
5 | impl<T00> Foo for T00 where T00: Sized {}
| -------------------------------------- first implementation here
6 |
7 | impl Foo for S {}
| ^^^^^^^^^^^^^^ conflicting implementation for `S`
For more information about this error, try `rustc --explain E0119`.
error: could not compile `Foo` (lib) due to 1 previous error
)
(expect_test::expect![[r#"
the rule "different trait" at (coherence.rs) failed because
condition evaluated to false: `impl_a.trait_id() != impl_b.trait_id()`
crates/formality-rust/src/prove/prove_via.rs:9:1: no applicable rules for prove_via { goal: ! Sized(!ty_0), via: !ty_0 = S, assumptions: {!ty_0 = S, Sized(!ty_0)}, env: Env { variables: [!ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }
crates/formality-rust/src/prove/prove_via.rs:9:1: no applicable rules for prove_via { goal: ! Sized(!ty_0), via: Sized(!ty_0), assumptions: {!ty_0 = S, Sized(!ty_0)}, env: Env { variables: [!ty_0], bias: Soundness, pending: [], allow_pending_outlives: false } }
the rule "negative impl" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.neg_impl_decls(&trait_ref.trait_id)`
the rule "not goal" at (coherence.rs) failed because
failed to prove {!ty_1 = S, Sized(!ty_1)} given {}, got [Constraints { env: Env { variables: [!ty_1], bias: Soundness, pending: [], allow_pending_outlives: false }, known_true: false, substitution: {} }]
the rule "same impl" at (coherence.rs) failed because
condition evaluated to false: `impl_a == impl_b`
impl_a = impl <ty> Foo for ^ty0_0 where ^ty0_0 : Sized { }
impl_b = impl Foo for S { }"#]]);
}
#[test]
t_tail_is_checked_after_substitution() {
Pair<u32, X>` ends in `X`, which may be unsized.
alityTest::new(crates![crate Foo {
struct Pair<A, B> where A: Sized { first: A, last: B }
trait Needs<T> where T: Sized {}
impl<X> Needs<Pair<u32, X>> for u32 {}
}])
tc_ok()
(expect_test::expect![[r#"
crates/formality-rust/src/prove/prove_sized.rs:12:1: no applicable rules for prove_sized { ty: !ty_0, assumptions: {}, env: Env { variables: [!ty_0], 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()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`"#]]);
}
#[test]
t_tail_is_followed_through_nested_structs() {
Outer<T>` ends in `Tail<T>`, which ends in `T`.
alityTest::new(crates![crate Foo {
struct Tail<T> { prefix: u32, tail: T }
struct Outer<T> { inner: Tail<T> }
trait Needs<T> where T: Sized {}
impl<T> Needs<Outer<T>> for u32 {}
}])
tc_ok()
(expect_test::expect![[r#"
crates/formality-rust/src/prove/prove_sized.rs:12:1: no applicable rules for prove_sized { ty: !ty_0, assumptions: {}, env: Env { variables: [!ty_0], 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()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`"#]]);
}
#[test]
_is_not_sized_if_normalized_type_may_be_unsized() {
<T as Assoc>::Out` normalizes to `T`, which may be unsized.
alityTest::new(crates![crate Foo {
struct W<T> { t: T }
trait Assoc { type Out: []; }
impl<T> Assoc for T { type Out = T; }
trait Needs<T> where T: Sized {}
impl<T> Needs<<T as Assoc>::Out> for W<T> {}
}])
tc_ok()
(expect_test::expect![[r#"
crates/formality-rust/src/prove/prove_sized.rs:12:1: no applicable rules for prove_sized { ty: !ty_0, assumptions: {}, env: Env { variables: [!ty_0], 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()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`"#]]);
}
#[test]
sive_struct_is_not_sized() {
Sized` is inductive, so the cycle through `next` doesn't prove `List: Sized`.
ustc rejects the struct itself (E0072), which formality doesn't check.
alityTest::new(crates![crate Foo {
struct List { next: List }
trait Needs<T> where T: Sized {}
impl Needs<List> for u32 {}
}])
tc_err(expect_test::expect![[r#"
error[E0072]: recursive type `List` has infinite size
--> lib.rs
|
1 | pub struct List {
| ^^^^^^^^^^^^^^^
2 | pub next: List,
| ---- recursive without indirection
|
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
2 | pub next: Box<List>,
| ++++ +
For more information about this error, try `rustc --explain E0072`.
error: could not compile `Foo` (lib) due to 1 previous error
)
(expect_test::expect![[r#"
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`"#]]);
}
#[test]
with_sized_struct_argument() {
alityTest::new(crates![crate Foo {
struct Tail<T> { prefix: u32, tail: T }
fn consume<T>(value: T) -> () where T: Sized {}
fn forward<T>(value: Tail<T>) -> () where T: Sized { consume::<Tail<T>>(value); }
fn main() -> () {}
}])
tc_ok()
);
}
#[test]
requires_sized_struct_argument() {
alityTest::new(crates![crate Foo {
struct Tail<T> { prefix: u32, tail: T }
fn consume<T>(value: T) -> () where T: Sized {}
fn forward<T>(value: Tail<T>) -> () { consume::<Tail<T>>(value); }
}])
tc_ok()
(expect_test::expect![[r#"
crates/formality-rust/src/prove/prove_sized.rs:12:1: no applicable rules for prove_sized { ty: !ty_0, assumptions: {}, env: Env { variables: [!ty_0], bias: Soundness, pending: [], allow_pending_outlives: true } }
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`"#]]);
}
#540: use the associated-type Sized bound; remove should_panic when fixed.
#[test]
_panic(expected = "prove_sized { ty: <!ty_0 as Tr>::A")]
iated_sized_bound_allows_nonfinal_struct_field() {
program = crates![crate Foo {
trait Tr { type A: [Sized]; }
struct S<T> where T: Tr { first: <T as Tr>::A, last: u32 }
fn main() -> () {}
}];
heck rustc before the expected formality failure.
(ok, stderr) = formality_rust::to_rust::test_util::run_rustc(&program);
rt!(ok, "{stderr}");
alityTest::new(program).rustc_ok().ok();
}
#540: use the associated-type Sized bound; remove should_panic when fixed.
#[test]
_panic(expected = "prove_sized { ty: <!ty_0 as Tr>::A")]
iated_sized_bound_allows_enum_field() {
program = crates![crate Foo {
trait Tr { type A: [Sized]; }
enum E<T> where T: Tr { Some { value: <T as Tr>::A }, None {} }
fn main() -> () {}
}];
heck rustc before the expected formality failure.
(ok, stderr) = formality_rust::to_rust::test_util::run_rustc(&program);
rt!(ok, "{stderr}");
alityTest::new(program).rustc_ok().ok();
}
#[test]
d_struct_sized_bound_executes() {
alityTest::new(crates![crate Foo {
struct Tail<T> { prefix: u32, tail: T }
struct Outer<T> { inner: Tail<T> }
fn consume<T>(value: T) -> u32 where T: Sized { return 7_u32; }
fn main() -> () {
println!(consume::<Outer<u32>>(Outer::<u32> {
inner: Tail::<u32> { prefix: 1_u32, tail: 2_u32 }
}));
}
Source location: tests/sized_trait.rs:453 (all coverage from this test)
fn main() -> () {}
}])
tc_ok()
);
}
#[test]
requires_sized_struct_argument() {
alityTest::new(crates![crate Foo {
struct Tail<T> { prefix: u32, tail: T }
fn consume<T>(value: T) -> () where T: Sized {}
fn forward<T>(value: Tail<T>) -> () { consume::<Tail<T>>(value); }
}])
tc_ok()
(expect_test::expect![[r#"
crates/formality-rust/src/prove/prove_sized.rs:12:1: no applicable rules for prove_sized { ty: !ty_0, assumptions: {}, env: Env { variables: [!ty_0], bias: Soundness, pending: [], allow_pending_outlives: true } }
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`
the rule "trait implied bound" at (prove_predicate.rs) failed because
expression evaluated to an empty collection: `decls.trait_invariants()`"#]]);
}
#540: use the associated-type Sized bound; remove should_panic when fixed.
#[test]
_panic(expected = "prove_sized { ty: <!ty_0 as Tr>::A")]
iated_sized_bound_allows_nonfinal_struct_field() {
program = crates![crate Foo {
trait Tr { type A: [Sized]; }
struct S<T> where T: Tr { first: <T as Tr>::A, last: u32 }
fn main() -> () {}
}];
heck rustc before the expected formality failure.
(ok, stderr) = formality_rust::to_rust::test_util::run_rustc(&program);
rt!(ok, "{stderr}");
alityTest::new(program).rustc_ok().ok();
}
#540: use the associated-type Sized bound; remove should_panic when fixed.
#[test]
_panic(expected = "prove_sized { ty: <!ty_0 as Tr>::A")]
iated_sized_bound_allows_enum_field() {
program = crates![crate Foo {
trait Tr { type A: [Sized]; }
enum E<T> where T: Tr { Some { value: <T as Tr>::A }, None {} }
fn main() -> () {}
}];
heck rustc before the expected formality failure.
(ok, stderr) = formality_rust::to_rust::test_util::run_rustc(&program);
rt!(ok, "{stderr}");
alityTest::new(program).rustc_ok().ok();
}
#[test]
d_struct_sized_bound_executes() {
alityTest::new(crates![crate Foo {
struct Tail<T> { prefix: u32, tail: T }
struct Outer<T> { inner: Tail<T> }
fn consume<T>(value: T) -> u32 where T: Sized { return 7_u32; }
fn main() -> () {
println!(consume::<Outer<u32>>(Outer::<u32> {
inner: Tail::<u32> { prefix: 1_u32, tail: 2_u32 }
}));
}
Source location: tests/sized_trait.rs:518 (all coverage from this test)
fn main() -> () {
println!(consume::<Outer<u32>>(Outer::<u32> {
inner: Tail::<u32> { prefix: 1_u32, tail: 2_u32 }
}));
}
Source location: tests/traits.rs:11 (all coverage from this test)
fn main() -> () { require_copy::<i128>(); }
}])
p_execute()
tc_ok()
);
}
#[test]
is_copy() {
alityTest::new(crates![crate test {
fn require_copy<T>() -> () where T: Copy { trusted }
fn main() -> () { require_copy::<u128>(); }
}])
p_execute()
tc_ok()
);
}
#[test]
_with_valid_fn() {
alityTest::new(crates![
crate core {
trait A {
fn a() -> ();
}
}
Source location: tests/traits.rs:22 (all coverage from this test)
fn main() -> () { require_copy::<u128>(); }
}])
p_execute()
tc_ok()
);
}
#[test]
_with_valid_fn() {
alityTest::new(crates![
crate core {
trait A {
fn a() -> ();
}
}