diff --git a/src/test/compile-fail/issue-32922.rs b/src/test/compile-fail/issue-32922.rs index 491c087c101de..317a47156c1ac 100644 --- a/src/test/compile-fail/issue-32922.rs +++ b/src/test/compile-fail/issue-32922.rs @@ -17,7 +17,7 @@ macro_rules! foo { () => { let _ = bar!(); }} -macro_rules! bar { // test issue #31856 +macro_rules! m { // test issue #31856 ($n:ident) => ( let a = 1; let $n = a; diff --git a/src/test/run-pass/hygiene.rs b/src/test/run-pass/hygiene.rs index d72386190ecd2..91648ee579826 100644 --- a/src/test/run-pass/hygiene.rs +++ b/src/test/run-pass/hygiene.rs @@ -22,23 +22,23 @@ fn f() { fn g() { let x = 0; - macro_rules! m { ($x:ident) => { - macro_rules! m2 { () => { ($x, x) } } + macro_rules! m { ($m1:ident, $m2:ident, $x:ident) => { + macro_rules! $m1 { () => { ($x, x) } } let x = 1; - macro_rules! m3 { () => { ($x, x) } } + macro_rules! $m2 { () => { ($x, x) } } } } let x = 2; - m!(x); + m!(m2, m3, x); let x = 3; assert_eq!(m2!(), (2, 0)); assert_eq!(m3!(), (2, 1)); let x = 4; - m!(x); - assert_eq!(m2!(), (4, 0)); - assert_eq!(m3!(), (4, 1)); + m!(m4, m5, x); + assert_eq!(m4!(), (4, 0)); + assert_eq!(m5!(), (4, 1)); } mod foo {