about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Clements <clements@racket-lang.org>2014-06-26 15:37:45 -0700
committerJohn Clements <clements@racket-lang.org>2014-06-27 22:08:51 -0700
commit7bad96e742b187b671500702bccb37ab1724bae5 (patch)
treefc7f112e5e13424f9346360eb545c1862cb6d862
parent47eec97cdab94989cc4c5f20a1e1f2310df997aa (diff)
downloadrust-7bad96e742b187b671500702bccb37ab1724bae5.tar.gz
rust-7bad96e742b187b671500702bccb37ab1724bae5.zip
improve match test case to include guard
-rw-r--r--src/libsyntax/ext/expand.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 832325f897b..941a4bb68c2 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -1274,13 +1274,13 @@ mod test {
     }
 
     // FIXME #9384, match variable hygiene. Should expand into
-    // fn z() {match 8 {x_1 => {match 9 {x_2 | x_2 => x_2 + x_1}}}}
+    // fn z() {match 8 {x_1 => {match 9 {x_2 | x_2 if x_2 == x_1 => x_2 + x_1}}}}
     #[test] fn issue_9384(){
         run_renaming_test(
-            &("macro_rules! bad_macro (($ex:expr) => ({match 9 {x | x => x + $ex}}))
-              fn z() {match 8 {x => bad_macro!(_x)}}",
+            &("macro_rules! bad_macro (($ex:expr) => ({match 9 {x | x if x == $ex => x + $ex}}))
+              fn z() {match 8 {x => bad_macro!(x)}}",
               // NB: the third "binding" is the repeat of the second one.
-              vec!(vec!(1),vec!(0),vec!(0)),
+              vec!(vec!(1,3),vec!(0,2),vec!(0,2)),
               true),
             0)
     }