Skip to content

Commit

Permalink
replace Add by tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhail-m1 committed Nov 2, 2017
1 parent d9e64eb commit 7d87054
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/test/mir-opt/match_false_edges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ fn guard2(_:i32) -> bool {

fn full_tested_match() {
let _ = match Some(42) {
Some(x) if guard() => 1 + x,
Some(y) => 2 + y,
None => 3,
Some(x) if guard() => (1, x),
Some(y) => (2, y),
None => (3, 3),
};
}

fn full_tested_match2() {
let _ = match Some(42) {
Some(x) if guard() => 1 + x,
None => 3,
Some(y) => 2 + y,
Some(x) if guard() => (1, x),
None => (3, 3),
Some(y) => (2, y),
};
}

Expand All @@ -55,12 +55,12 @@ fn main() {
// bb1: { // arm1
// StorageLive(_7);
// _7 = _3;
// _1 = Add(const 1i32, _7);
// ...
// _1 = (const 1i32, _7);
// StorageDead(_7);
// goto -> bb11;
// }
// bb2: { // binding3(empty) and arm3
// _1 = const 3i32;
// _1 = (const 3i32, const 3i32);
// goto -> bb11;
// }
// bb3: {
Expand Down Expand Up @@ -92,7 +92,7 @@ fn main() {
// _4 = ((_2 as Some).0: i32);
// StorageLive(_8);
// _8 = _4;
// _1 = Add(const 2i32, _8);
// _1 = (const 2i32, _8);
// StorageDead(_8);
// goto -> bb11;
// }
Expand All @@ -102,7 +102,7 @@ fn main() {
// }
// END rustc.node17.SimplifyBranches-initial.before.mir
//
// START rustc.node40.SimplifyBranches-initial.before.mir
// START rustc.node42.SimplifyBranches-initial.before.mir
// bb0: {
// ...
// _2 = std::option::Option<i32>::Some(const 42i32,);
Expand All @@ -112,12 +112,12 @@ fn main() {
// bb1: { // arm1
// StorageLive(_7);
// _7 = _3;
// _1 = Add(const 1i32, _7);
// ...
// _1 = (const 1i32, _7);
// StorageDead(_7);
// goto -> bb11;
// }
// bb2: { // binding3(empty) and arm3
// _1 = const 3i32;
// _1 = (const 3i32, const 3i32);
// goto -> bb11;
// }
// bb3: {
Expand Down Expand Up @@ -149,17 +149,17 @@ fn main() {
// _4 = ((_2 as Some).0: i32);
// StorageLive(_8);
// _8 = _4;
// _1 = Add(const 2i32, _8);
// _1 = (const 2i32, _8);
// StorageDead(_8);
// goto -> bb11;
// }
// bb11: {
// ...
// return;
// }
// END rustc.node40.SimplifyBranches-initial.before.mir
// END rustc.node42.SimplifyBranches-initial.before.mir
//
// START rustc.node63.SimplifyBranches-initial.before.mir
// START rustc.node67.SimplifyBranches-initial.before.mir
// bb0: {
// ...
// _2 = std::option::Option<i32>::Some(const 1i32,);
Expand Down Expand Up @@ -233,4 +233,4 @@ fn main() {
// ...
// return;
// }
// END rustc.node63.SimplifyBranches-initial.before.mir
// END rustc.node67.SimplifyBranches-initial.before.mir

0 comments on commit 7d87054

Please sign in to comment.