]> git.lizzy.rs Git - rust.git/blob - src/test/ui/attr-from-macro.rs
Auto merge of #103496 - petrochenkov:effvisdoc2, r=lqd
[rust.git] / src / test / ui / attr-from-macro.rs
1 // aux-build:attr-from-macro.rs
2 // run-pass
3
4 extern crate attr_from_macro;
5
6 attr_from_macro::creator! {
7     struct Foo;
8     enum Bar;
9     enum FooBar;
10 }
11
12 fn main() {
13     // Checking the `repr(u32)` on the enum.
14     assert_eq!(4, std::mem::size_of::<Bar>());
15     // Checking the `repr(u16)` on the enum.
16     assert_eq!(2, std::mem::size_of::<FooBar>());
17
18     // Checking the Debug impl on the types.
19     eprintln!("{:?} {:?} {:?}", Foo, Bar::A, FooBar::A);
20 }