annotated 0.3.1

Declarative validation for structs and enums, like data annotations, that works with serde: every broken rule and missing field in one error
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! What the derives and traits refuse, with the compile error that explains why.

#[test]
fn compile_errors_explain_what_the_derive_refuses() {
    let cases = trybuild::TestCases::new();
    cases.compile_fail("tests/ui/*.rs");
    #[cfg(feature = "serde")]
    cases.compile_fail("tests/ui/deserialize/*.rs");
    #[cfg(feature = "regex")]
    cases.compile_fail("tests/ui/regex/*.rs");
    #[cfg(not(feature = "regex"))]
    cases.compile_fail("tests/ui/without-regex/*.rs");
    #[cfg(not(feature = "unicode"))]
    cases.compile_fail("tests/ui/without-unicode/*.rs");
}