Negative coverage: check_trait_impl_item / associated ty value / premise check_associated_ty_value(program, env, assumptions, trait_items, v) => ()
Premise at line 193. Observed failure causes: failed_judgment.
associated ty value| Line | Coverage | Source |
|---|---|---|
| 193 | 1 | (check_associated_ty_value(program, env, assumptions, trait_items, v) => ()) |
| ──────── ("associated ty value") | ||
| 195 | 311 | (check_trait_impl_item(program, env, assumptions, trait_items, ImplItem::AssociatedTyValue(v), crate_id) => ()) |
1 test failed proving this premise:
Source location: tests/outlives.rs:42 (all coverage from this test)
#[test]
fn assoc_type_impl_violates_static_bound() {
FormalityTest::new(crates![crate Foo {
trait A { type Item: ['static]; }
impl<'a> A for &'a u32 { type Item = &'a u32; }
}])
.skip_execute()
.rustc_err(expect_test::expect![[r#"
error[E0477]: the type `&'a00 u32` does not fulfill the required lifetime
--> lib.rs
|
6 | type Item = &'a00 u32;
| ^^^^^^^^^
|
note: type must satisfy the static lifetime as required by this binding
--> lib.rs
|
2 | type Item: 'static;
| ^^^^^^^
For more information about this error, try `rustc --explain E0477`.
error: could not compile `Foo` (lib) due to 1 previous error
"#]])
.err(expect_test::expect!["crates/formality-rust/src/prove/prove_outlives.rs:8:1: no applicable rules for prove_outlives { a: !lt_0, b: ' static, assumptions: {}, env: Env { variables: [!lt_0], bias: Soundness, pending: [], allow_pending_outlives: false } }"]);
}
Failed proof tree
check_all_crates failedmod.rs:42args
rule "check all prefixes"mod.rs:54check_crate failedmod.rs:61args
rule "check crate"mod.rs:75check_crate_item failedmod.rs:180rule "trait impl"mod.rs:195check_trait_impl failedimpls.rs:14rule "check_trait_impl"impls.rs:37check_trait_impl_item failedimpls.rs:175rule "associated ty value"impls.rs:193check_associated_ty_value failedimpls.rs:247rule "check_associated_ty_value"impls.rs:283prove failedfunction.rs:250args
rulefunction.rs:250prove_predicate_list failedprove_predicate_list.rs:8args
rule "some"prove_predicate_list.rs:26prove_predicate failedprove_predicate.rs:23args
rule "outlives"prove_predicate.rs:151prove_outlives failedprove_outlives.rs:8args
rule "rigid types"prove_outlives.rs:69prove failedprove_outlives.rs:69args
ruleprove_outlives.rs:69prove_predicate_list failedprove_predicate_list.rs:8args
rule "some"prove_predicate_list.rs:27prove_after failedprove_after.rs:8args
rule "prove_after"prove_after.rs:19prove failedprove_after.rs:19args
ruleprove_after.rs:19prove_predicate_list failedprove_predicate_list.rs:8args
rule "some"prove_predicate_list.rs:26prove_predicate failedprove_predicate.rs:23args
rule "outlives"prove_predicate.rs:151prove_outlives failedprove_outlives.rs:8args