From e2be7aca08f5eac1c0a0eae589c916fc39d57193 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Tue, 1 Oct 2013 02:03:43 +0200 Subject: [PATCH] Expanded test to clarify that the constants *are* matching when they should. --- src/test/run-pass/match-static-const-rename.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/test/run-pass/match-static-const-rename.rs b/src/test/run-pass/match-static-const-rename.rs index 0d3dd25ef9c..3da4e0505bb 100644 --- a/src/test/run-pass/match-static-const-rename.rs +++ b/src/test/run-pass/match-static-const-rename.rs @@ -26,6 +26,11 @@ fn f() { (x, y) => 1 + x + y, }; assert!(r == 1); + let r = match (0,97) { + (0, A) => 0, + (x, y) => 1 + x + y, + }; + assert!(r == 0); } mod m { @@ -39,6 +44,11 @@ fn g() { (x, y) => 1 + x + y, }; assert!(r == 1); + let r = match (0,7) { + (0, AHA) => 0, + (x, y) => 1 + x + y, + }; + assert!(r == 0); } fn h() { @@ -47,6 +57,11 @@ fn h() { (x, y) => 1 + x + y, }; assert!(r == 1); + let r = match (0,7) { + (0, m::aha) => 0, + (x, y) => 1 + x + y, + }; + assert!(r == 0); } fn main () {