obstruct 0.1.0

An experimental implementation of anonymous structs and named function arguments
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![feature(associated_const_equality)]
fn struct_bad_field_names() {
    // Check that the code won't build if the field names are incorrect

    const RED: &str = "red";
    const GREEN: f64 = 1.0;
    const BLUE: () = ();

    use obstruct_macros::{instruct, destruct};

    let structured = instruct! { red: RED, green: GREEN, blue: BLUE };

    destruct! { let {red, green, oops} = structured }; // Look, we've used oops!
    // This fails with an error message mentioning oops.
}
fn main() {}