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

Positive coverage: prove_wc / alias eq

alias eq
LineCoverageSource
111(prove_eq(decls, env, assumptions, alias_ty, ty) => c)
──────── ("alias eq")
1131(prove_wc(decls, env, assumptions, Predicate::AliasEq(alias_ty, ty)) => c)

1 test exercised this rule:


Source location: tests/projection.rs:115

#[test]
fn projection_equality() {
    test_where_clause(
        PROJECTION_EQUALITY,
        "exists<U> {} => { Trait1(S), <S as Trait1<>>::Type = U }",
    )
    .assert_ok(expect_test::expect!["{Constraints { env: Env { variables: [?ty_1], bias: Soundness, pending: [], allow_pending_outlives: false }, known_true: true, substitution: {?ty_1 => u32} }, Constraints { env: Env { variables: [?ty_1], bias: Soundness, pending: [], allow_pending_outlives: false }, known_true: true, substitution: {?ty_1 => <S as Trait1>::Type} }}"]);

    test_where_clause(PROJECTION_EQUALITY, "exists<U> {} => { Trait2(S, U) }")
        .assert_ok(expect_test::expect!["{Constraints { env: Env { variables: [?ty_1], bias: Soundness, pending: [], allow_pending_outlives: false }, known_true: true, substitution: {?ty_1 => u32} }, Constraints { env: Env { variables: [?ty_1], bias: Soundness, pending: [], allow_pending_outlives: false }, known_true: true, substitution: {?ty_1 => <S as Trait1>::Type} }}"]);
}
Proof tree