From c3358a4346fb75be59cc7e50dc4b7da3d8d3765f Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Sat, 18 Nov 2017 15:41:07 +0200 Subject: [PATCH] Don't glob-import overlapping variant names in test/codegen/match-optimizes-away.rs. --- src/test/codegen/match-optimizes-away.rs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/test/codegen/match-optimizes-away.rs b/src/test/codegen/match-optimizes-away.rs index c0f2f64f82c8d..d7b779374314d 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, } }