2 // `N` - number of combination, from 0 to 4*4*4=64
3 // `Outer < Invoc` means that expansion that produced macro definition `Outer`
4 // is a strict ancestor of expansion that produced macro definition `Inner`.
5 // `>`, `=` and `Unordered` mean "strict descendant", "same" and
6 // "not in ordering relation" for parent expansions.
7 // `+` - possible configuration
8 // `-` - configuration impossible due to properties of partial ordering
9 // `-?` - configuration impossible due to block/scope syntax
10 // `+?` - configuration possible only with legacy scoping
12 // N | Outer ~ Invoc | Invoc ~ Inner | Outer ~ Inner | Possible |
13 // 1 | < | < | < | + |
14 // 2 | < | < | = | - |
15 // 3 | < | < | > | - |
16 // 4 | < | < | Unordered | - |
17 // 5 | < | = | < | + |
18 // 6 | < | = | = | - |
19 // 7 | < | = | > | - |
20 // 8 | < | = | Unordered | - |
21 // 9 | < | > | < | + |
22 // 10 | < | > | = | + |
23 // 11 | < | > | > | -? |
24 // 12 | < | > | Unordered | -? |
25 // 13 | < | Unordered | < | + |
26 // 14 | < | Unordered | = | - |
27 // 15 | < | Unordered | > | - |
28 // 16 | < | Unordered | Unordered | -? |
29 // 17 | = | < | < | + |
30 // 18 | = | < | = | - |
31 // 19 | = | < | > | - |
32 // 20 | = | < | Unordered | - |
33 // 21 | = | = | < | - |
34 // 22 | = | = | = | + |
35 // 23 | = | = | > | - |
36 // 24 | = | = | Unordered | - |
37 // 25 | = | > | < | - |
38 // 26 | = | > | = | - |
39 // 27 | = | > | > | -? |
40 // 28 | = | > | Unordered | - |
41 // 29 | = | Unordered | < | - |
42 // 30 | = | Unordered | = | - |
43 // 31 | = | Unordered | > | - |
44 // 32 | = | Unordered | Unordered | -? |
45 // 33 | > | < | < | -? |
46 // 34 | > | < | = | -? |
47 // 35 | > | < | > | -? |
48 // 36 | > | < | Unordered | + |
49 // 37 | > | = | < | - |
50 // 38 | > | = | = | - |
51 // 39 | > | = | > | + |
52 // 40 | > | = | Unordered | - |
53 // 41 | > | > | < | - |
54 // 42 | > | > | = | - |
55 // 43 | > | > | > | -? |
56 // 44 | > | > | Unordered | - |
57 // 45 | > | Unordered | < | - |
58 // 46 | > | Unordered | = | - |
59 // 47 | > | Unordered | > | -? |
60 // 48 | > | Unordered | Unordered | -? |
61 // 49 | Unordered | < | < | -? |
62 // 50 | Unordered | < | = | - |
63 // 51 | Unordered | < | > | - |
64 // 52 | Unordered | < | Unordered | + |
65 // 53 | Unordered | = | < | - |
66 // 54 | Unordered | = | = | - |
67 // 55 | Unordered | = | > | - |
68 // 56 | Unordered | = | Unordered | + |
69 // 57 | Unordered | > | < | - |
70 // 58 | Unordered | > | = | - |
71 // 59 | Unordered | > | > | + |
72 // 60 | Unordered | > | Unordered | + |
73 // 61 | Unordered | Unordered | < | -? |
74 // 62 | Unordered | Unordered | = | -? |
75 // 63 | Unordered | Unordered | > | -? |
76 // 64 | Unordered | Unordered | Unordered | + |
78 #![feature(decl_macro, rustc_attrs)]
81 // struct Wrong; // not defined
83 #[rustc_macro_transparency = "transparent"]
85 #[rustc_macro_transparency = "transparent"]
89 #[rustc_macro_transparency = "transparent"]
93 #[rustc_macro_transparency = "transparent"]
101 #[rustc_macro_transparency = "transparent"]
102 macro gen_gen_inner_invoc() {
104 m!(); //~ ERROR `m` is ambiguous
106 gen_gen_inner_invoc!();
113 #[rustc_macro_transparency = "transparent"]
114 macro gen_inner_invoc() {
125 #[rustc_macro_transparency = "transparent"]
126 macro gen_inner_gen_invoc() {
130 gen_inner_gen_invoc!();
146 #[rustc_macro_transparency = "transparent"]
147 macro gen_invoc() { m!() } //~ ERROR `m` is ambiguous
156 m!(); //~ ERROR `m` is ambiguous
172 m!(); //~ ERROR `m` is ambiguous
187 #[rustc_macro_transparency = "transparent"]
188 macro gen_gen_inner_invoc() {
190 m!(); //~ ERROR `m` is ambiguous
192 gen_gen_inner_invoc!();
199 #[rustc_macro_transparency = "transparent"]
200 macro gen_inner_invoc() {
219 #[rustc_macro_transparency = "transparent"]
220 macro gen_inner_gen_invoc() {
224 gen_inner_gen_invoc!();
232 #[rustc_macro_transparency = "transparent"]
233 macro gen_invoc() { m!() } //~ ERROR `m` is ambiguous