anodized 0.5.0

A common specification layer for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[test]
fn qualifier_narrowing_fails_to_compile() {
    let output = std::process::Command::new("cargo")
        .arg("build")
        .current_dir("tests/build_fail/trait_narrowing")
        .output()
        .expect("failed to run cargo");

    let stderr = String::from_utf8_lossy(&output.stderr);

    assert!(!output.status.success(), "expected compilation to fail");
    assert!(
        stderr.contains("the qualifiers on the impl `WeakerImplQualifiers < T >::find_min` cannot be weaker than the qualifiers on the trait `MinFinder < T >::find_min`"),
        "expected specific error message, got:\n{stderr}"
    );
}