derive_dst 0.1.2

Derive macro for DST structs: generates a private `UninitFoo` MaybeUninit mirror, safe allocation constructors (`new_uninit_for_size` / `new_uninit_for_count` returning the box with its `Layout`, tail offset & count), an unsafe `assume_init`, and layout constructors (`layout_for_size` / `layout_for_count`) returning `LayoutError`. Requires nightly.
Documentation
1
2
3
4
5
6
7
8
9
10
// The `.stderr` files are recorded with native `proc_macro_diagnostic` output (nightly);
// on toolchains without it the fallback rendering differs, so only run there.

#[cfg(not(miri))]
#[test]
fn errors() {
    use trybuild::TestCases;

    TestCases::new().compile_fail("tests/compilation/fail_*.rs");
}