]> git.proxmox.com Git - rustc.git/blame - src/test/ui/attr-from-macro.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / attr-from-macro.rs
CommitLineData
2b03887a
FG
1// aux-build:attr-from-macro.rs
2// run-pass
3
4extern crate attr_from_macro;
5
6attr_from_macro::creator! {
7 struct Foo;
8 enum Bar;
9 enum FooBar;
10}
11
12fn 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}