Skip to content

Commit 057302b

Browse files
committed
Fix fallout in tests.
1 parent 9de6bdc commit 057302b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/test/compile-fail/issue-32922.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ macro_rules! foo { () => {
1717
let _ = bar!();
1818
}}
1919

20-
macro_rules! bar { // test issue #31856
20+
macro_rules! m { // test issue #31856
2121
($n:ident) => (
2222
let a = 1;
2323
let $n = a;

src/test/run-pass/hygiene.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ fn f() {
2222

2323
fn g() {
2424
let x = 0;
25-
macro_rules! m { ($x:ident) => {
26-
macro_rules! m2 { () => { ($x, x) } }
25+
macro_rules! m { ($m1:ident, $m2:ident, $x:ident) => {
26+
macro_rules! $m1 { () => { ($x, x) } }
2727
let x = 1;
28-
macro_rules! m3 { () => { ($x, x) } }
28+
macro_rules! $m2 { () => { ($x, x) } }
2929
} }
3030

3131
let x = 2;
32-
m!(x);
32+
m!(m2, m3, x);
3333

3434
let x = 3;
3535
assert_eq!(m2!(), (2, 0));
3636
assert_eq!(m3!(), (2, 1));
3737

3838
let x = 4;
39-
m!(x);
40-
assert_eq!(m2!(), (4, 0));
41-
assert_eq!(m3!(), (4, 1));
39+
m!(m4, m5, x);
40+
assert_eq!(m4!(), (4, 0));
41+
assert_eq!(m5!(), (4, 1));
4242
}
4343

4444
mod foo {

0 commit comments

Comments
 (0)