about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSimon Vandel Sillesen <simon.vandel@gmail.com>2020-09-19 23:38:54 +0200
committerSimon Vandel Sillesen <simon.vandel@gmail.com>2020-09-20 14:45:46 +0200
commit04834139c43761efd2b14e37e819774033241ba2 (patch)
tree03f61bd2d85452279536cedfc7cfa76a5a0d605a
parent5cc93950acb18c5b0978583ea518940336e847af (diff)
downloadrust-04834139c43761efd2b14e37e819774033241ba2.tar.gz
rust-04834139c43761efd2b14e37e819774033241ba2.zip
replace usize with u32 to make it easier to bless
-rw-r--r--src/test/mir-opt/early_otherwise_branch.rs13
-rw-r--r--src/test/mir-opt/early_otherwise_branch_3_element_tuple.rs7
-rw-r--r--src/test/mir-opt/early_otherwise_branch_noopt.rs13
3 files changed, 15 insertions, 18 deletions
diff --git a/src/test/mir-opt/early_otherwise_branch.rs b/src/test/mir-opt/early_otherwise_branch.rs
index a1ffcda7467..77003442080 100644
--- a/src/test/mir-opt/early_otherwise_branch.rs
+++ b/src/test/mir-opt/early_otherwise_branch.rs
@@ -1,19 +1,18 @@
 // compile-flags: -Z mir-opt-level=3
-// EMIT_MIR_FOR_EACH_BIT_WIDTH
 // EMIT_MIR early_otherwise_branch.opt1.EarlyOtherwiseBranch.diff
-fn opt1(x: Option<usize>, y:Option<usize>) -> usize {
-    match (x,y) {
+fn opt1(x: Option<u32>, y: Option<u32>) -> u32 {
+    match (x, y) {
         (Some(a), Some(b)) => 0,
-        _ => 1
+        _ => 1,
     }
 }
 
 // EMIT_MIR early_otherwise_branch.opt2.EarlyOtherwiseBranch.diff
-fn opt2(x: Option<usize>, y:Option<usize>) -> usize {
-    match (x,y) {
+fn opt2(x: Option<u32>, y: Option<u32>) -> u32 {
+    match (x, y) {
         (Some(a), Some(b)) => 0,
         (None, None) => 0,
-        _ => 1
+        _ => 1,
     }
 }
 
diff --git a/src/test/mir-opt/early_otherwise_branch_3_element_tuple.rs b/src/test/mir-opt/early_otherwise_branch_3_element_tuple.rs
index ffb5de096c3..1d6877d67df 100644
--- a/src/test/mir-opt/early_otherwise_branch_3_element_tuple.rs
+++ b/src/test/mir-opt/early_otherwise_branch_3_element_tuple.rs
@@ -1,11 +1,10 @@
 // compile-flags: -Z mir-opt-level=3
 
-// EMIT_MIR_FOR_EACH_BIT_WIDTH
 // EMIT_MIR early_otherwise_branch_3_element_tuple.opt1.EarlyOtherwiseBranch.diff
-fn opt1(x: Option<usize>, y:Option<usize>, z:Option<usize>) -> usize {
-    match (x,y,z) {
+fn opt1(x: Option<u32>, y: Option<u32>, z: Option<u32>) -> u32 {
+    match (x, y, z) {
         (Some(a), Some(b), Some(c)) => 0,
-        _ => 1
+        _ => 1,
     }
 }
 
diff --git a/src/test/mir-opt/early_otherwise_branch_noopt.rs b/src/test/mir-opt/early_otherwise_branch_noopt.rs
index 8c4b37ac7a8..bd15f520dfc 100644
--- a/src/test/mir-opt/early_otherwise_branch_noopt.rs
+++ b/src/test/mir-opt/early_otherwise_branch_noopt.rs
@@ -3,23 +3,22 @@
 // must not optimize as it does not follow the pattern of
 // left and right hand side being the same variant
 
-// EMIT_MIR_FOR_EACH_BIT_WIDTH
 // EMIT_MIR early_otherwise_branch_noopt.noopt1.EarlyOtherwiseBranch.diff
-fn noopt1(x: Option<usize>, y:Option<usize>) -> usize {
-    match (x,y) {
+fn noopt1(x: Option<u32>, y: Option<u32>) -> u32 {
+    match (x, y) {
         (Some(a), Some(b)) => 0,
         (Some(a), None) => 1,
         (None, Some(b)) => 2,
-        (None, None) => 3
+        (None, None) => 3,
     }
 }
 
 // must not optimize as the types being matched on are not identical
 // EMIT_MIR early_otherwise_branch_noopt.noopt2.EarlyOtherwiseBranch.diff
-fn noopt2(x: Option<usize>, y:Option<bool>) -> usize {
-    match (x,y) {
+fn noopt2(x: Option<u32>, y: Option<bool>) -> u32 {
+    match (x, y) {
         (Some(a), Some(b)) => 0,
-        _ => 1
+        _ => 1,
     }
 }