Skip to content

Commit

Permalink
Fix fallout in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jseyfried committed Oct 2, 2016
1 parent 9de6bdc commit 057302b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-32922.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions src/test/run-pass/hygiene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 057302b

Please sign in to comment.