about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2017-11-18 15:41:07 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2017-11-19 09:12:10 +0200
commitfb832833e2da8c5734ce62d43988327a176af38a (patch)
tree36128a3f6016cf43044541f7ac0fe8227819d24a
parent95687bfe27d9db705adfa9b7ae9d8e960b813b1b (diff)
downloadrust-fb832833e2da8c5734ce62d43988327a176af38a.tar.gz
rust-fb832833e2da8c5734ce62d43988327a176af38a.zip
Don't glob-import overlapping variant names in test/codegen/match-optimizes-away.rs.
-rw-r--r--src/test/codegen/match-optimizes-away.rs20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/test/codegen/match-optimizes-away.rs b/src/test/codegen/match-optimizes-away.rs
index c0f2f64f82c..d7b77937431 100644
--- a/src/test/codegen/match-optimizes-away.rs
+++ b/src/test/codegen/match-optimizes-away.rs
@@ -12,11 +12,9 @@
 // compile-flags: -O
 #![crate_type="lib"]
 
-pub enum Three { First, Second, Third }
-use Three::*;
+pub enum Three { A, B, C }
 
-pub enum Four { First, Second, Third, Fourth }
-use Four::*;
+pub enum Four { A, B, C, D }
 
 #[no_mangle]
 pub fn three_valued(x: Three) -> Three {
@@ -24,9 +22,9 @@ pub fn three_valued(x: Three) -> Three {
     // CHECK-NEXT: {{^.*:$}}
     // CHECK-NEXT: ret i8 %0
     match x {
-        First => First,
-        Second => Second,
-        Third => Third,
+        Three::A => Three::A,
+        Three::B => Three::B,
+        Three::C => Three::C,
     }
 }
 
@@ -36,9 +34,9 @@ pub fn four_valued(x: Four) -> Four {
     // CHECK-NEXT: {{^.*:$}}
     // CHECK-NEXT: ret i8 %0
     match x {
-        First => First,
-        Second => Second,
-        Third => Third,
-        Fourth => Fourth,
+        Four::A => Four::A,
+        Four::B => Four::B,
+        Four::C => Four::C,
+        Four::D => Four::D,
     }
 }