1 #![allow(unused_macros)]
3 mod macros_cant_escape_fns {
5 macro_rules! m { () => { 3 + 4 } }
8 //~^ ERROR cannot find macro
11 mod macros_cant_escape_mods {
13 macro_rules! m { () => { 3 + 4 } }
15 fn g() -> i32 { m!() }
16 //~^ ERROR cannot find macro
19 mod macros_can_escape_flattened_mods_test {
22 macro_rules! m { () => { 3 + 4 } }
24 fn g() -> i32 { m!() }
27 fn macro_tokens_should_match() {
28 macro_rules! m { (a) => { 13 } }
32 // should be able to use a bound identifier as a literal in a macro definition:
33 fn self_macro_parsing() {
34 macro_rules! foo { (zz) => { 287; } }