diff options
Diffstat (limited to 'tests/ui/proc-macro/derive-union.rs')
-rw-r--r-- | tests/ui/proc-macro/derive-union.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/derive-union.rs b/tests/ui/proc-macro/derive-union.rs new file mode 100644 index 000000000..e83eee093 --- /dev/null +++ b/tests/ui/proc-macro/derive-union.rs @@ -0,0 +1,17 @@ +// run-pass + +#![allow(unused_variables)] +// aux-build:derive-union.rs + +#[macro_use] +extern crate derive_union; + +#[repr(C)] +#[derive(UnionTest)] +union Test { + a: u8, +} + +fn main() { + let t = Test { a: 0 }; +} |