flense 0.2.2

Purpose-oriented lensing
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Compilation tests for the field-disjointness check enforced by
//! LensesMut::lens_mut and LensesSliceMut::lens_slice_mut, and for lifetime
//! correctness across LensMut and LensSliceMut.
//!
//! Note: a `pass` case is included to force trybuild to use `cargo build`
//! instead of `cargo check`. The disjointness check is a post-monomorphization
//! const assertion which `cargo check` does not surface (rust-lang/rust#99682).

#[cfg(not(miri))]
#[test]
fn ui() {
    let t = trybuild::TestCases::new();
    t.pass("tests/ui-overlap-pass/*.rs");
    t.compile_fail("tests/ui-overlap/*.rs");
    t.pass("tests/ui-alias-pass/*.rs");
    t.compile_fail("tests/ui-alias/*.rs");
}