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: check_adt / check adt / premise check_adt_variant_names_unique(adt) => ()

Premise at line 18. Observed failure causes: inapplicable.

check adt
LineCoverageSource
182(check_adt_variant_names_unique(adt) => ())
19N/A(let (env, bound_data) = Env::default().instantiate_universally(&adt.binder))
20N/A(let AdtBoundData { where_clauses, variants } = bound_data)
211(prove_where_clauses_well_formed(program, env, where_clauses, where_clauses) => ())
22(for_all(variant in variants)
(let Variant { fields, .. } = variant)
(for_all(field in fields)
(let Field { ty, .. } = field)
(prove_goal(program, env, where_clauses, Relation::well_formed(ty)) => ())))
──────── ("check adt")
2831(check_adt(program, adt) => ())

2 tests failed proving this premise:


Source location: tests/basic_tests.rs:277

#[test]
fn basic_adt_variant_dup() {
    FormalityTest::new(crates![crate Foo {
        enum Bar {
            Baz{},
            Baz{},
        }
    }])
    .err(expect_test::expect![[r#"
        the rule "check adt" at (adts.rs) failed because
          variant "Baz" defined multiple times"#]])
}
Failed proof tree

Source location: tests/basic_tests.rs:290

#[test]
fn basic_adt_field_dup() {
    FormalityTest::new(crates![crate Foo {
        struct Bar {
            baz: (),
            baz: (),
        }
    }])
    .err(expect_test::expect![[r#"
        the rule "check adt" at (adts.rs) failed because
          field "baz" of variant "struct" defined multiple times"#]])
}
Failed proof tree