gcc/testsuite/rust/compile/macros/mbe/macro44.rs
raw| 1 | mod foo { |
| 2 | mod bar { |
| 3 | mod baz { |
| 4 | macro_rules! baz { |
| 5 | () => {{}}; |
| 6 | } |
| 7 | } |
| 8 | } |
| 9 | |
| 10 | macro_rules! foo { |
| 11 | () => {{}}; |
| 12 | } |
| 13 | |
| 14 | fn foo_f() { |
| 15 | foo!(); |
| 16 | } |
| 17 | |
| 18 | fn bar_f() { |
| 19 | baz!(); // { dg-error "could not resolve macro invocation" } |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | mod foo2 { |
| 24 | #[macro_export] |
| 25 | macro_rules! bar1 { |
| 26 | () => {}; |
| 27 | } |
| 28 | |
| 29 | macro_rules! bar2 { |
| 30 | () => {}; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | fn main() {} |