Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Negative coverage: prove_sized / tuples / premise prove(decls, env, assumptions, Predicates::all_sized(parameters)) => c

Premise at line 31. Observed failure causes: failed_judgment.

tuples
LineCoverageSource
311(prove(decls, env, assumptions, Predicates::all_sized(parameters)) => c)
──────── ("tuples")
331(prove_sized(decls, env, assumptions, RigidTy { name: RigidName::Tuple(_), parameters }) => c)

1 test failed proving this premise:


Source location: tests/sized_trait.rs:174 (all coverage from this test)

#[test]
fn tuple_requires_every_element_sized() {
    // In rustc, `(T, bool)` isn't even well-formed if `T` is unsized.
    FormalityTest::new(crates![crate Foo {
        trait Needs<T> where T: Sized {}
        impl<T> Needs<(T, bool)> for u32 {}
    }])
    .rustc_ok()
    .err(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()`"#]]);
}
Failed proof tree

How to read this page