]>
Commit | Line | Data |
---|---|---|
136023e0 XL |
1 | #![feature(decl_macro)] |
2 | ||
3 | pub macro addr_of($place:expr) { | |
4 | &raw const $place | |
5 | } | |
6 | ||
7 | pub macro addr_of_self($place:expr) { | |
8 | &raw const $place | |
9 | } | |
10 | ||
11 | pub macro addr_of_crate($place:expr) { | |
12 | &raw const $place | |
13 | } | |
14 | ||
15 | pub struct Foo; | |
16 | pub struct FooSelf; | |
17 | pub struct FooCrate; | |
18 | ||
19 | pub enum Bar { Foo, } | |
20 | pub enum BarSelf { Foo, } | |
21 | pub enum BarCrate { Foo, } | |
22 | ||
23 | pub fn foo() {} | |
24 | pub fn foo_self() {} | |
25 | pub fn foo_crate() {} | |
26 | ||
27 | pub type Type = i32; | |
28 | pub type TypeSelf = i32; | |
29 | pub type TypeCrate = i32; | |
30 | ||
31 | pub union Union { | |
32 | a: i8, | |
33 | b: i8, | |
34 | } | |
35 | pub union UnionSelf { | |
36 | a: i8, | |
37 | b: i8, | |
38 | } | |
39 | pub union UnionCrate { | |
40 | a: i8, | |
41 | b: i8, | |
42 | } |