Skip to content

[let_chains, 1/6] Remove hir::ExprKind::If #59288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 11, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/test/mir-opt/issue-38669.rs
Original file line number Diff line number Diff line change
@@ -27,15 +27,17 @@ fn main() {
// bb3: {
// StorageLive(_4);
// _4 = _1;
// switchInt(move _4) -> [false: bb5, otherwise: bb4];
// FakeRead(ForMatchedPlace, _4);
// switchInt(_4) -> [false: bb5, otherwise: bb4];
// }
// bb4: {
// ...
// bb7: {
// _0 = ();
// StorageDead(_4);
// StorageDead(_1);
// return;
// }
// bb5: {
// bb8: {
// _3 = ();
// StorageDead(_4);
// _1 = const true;
21 changes: 11 additions & 10 deletions src/test/mir-opt/loop_test.rs
Original file line number Diff line number Diff line change
@@ -22,19 +22,20 @@ fn main() {
// resume;
// }
// ...
// bb3: { // Entry into the loop
// bb6: { // Entry into the loop
// _1 = ();
// goto -> bb4;
// StorageDead(_2);
// goto -> bb7;
// }
// bb4: { // The loop_block
// falseUnwind -> [real: bb5, cleanup: bb1];
// bb7: { // The loop_block
// falseUnwind -> [real: bb8, cleanup: bb1];
// }
// bb5: { // The loop body (body_block)
// StorageLive(_5);
// _5 = const 1i32;
// FakeRead(ForLet, _5);
// StorageDead(_5);
// goto -> bb4;
// bb8: { // The loop body (body_block)
// StorageLive(_6);
// _6 = const 1i32;
// FakeRead(ForLet, _6);
// StorageDead(_6);
// goto -> bb7;
// }
// ...
// END rustc.main.SimplifyCfg-qualify-consts.after.mir
6 changes: 3 additions & 3 deletions src/test/mir-opt/nll/region-subtyping-basic.rs
Original file line number Diff line number Diff line change
@@ -22,9 +22,9 @@ fn main() {

// END RUST SOURCE
// START rustc.main.nll.0.mir
// | '_#2r | U0 | {bb2[0..=5], bb3[0..=1]}
// | '_#3r | U0 | {bb2[1..=5], bb3[0..=1]}
// | '_#4r | U0 | {bb2[4..=5], bb3[0..=1]}
// | '_#2r | U0 | {bb2[0..=8], bb3[0], bb6[0..=1]}
// | '_#3r | U0 | {bb2[1..=8], bb3[0], bb6[0..=1]}
// | '_#4r | U0 | {bb2[4..=8], bb3[0], bb6[0..=1]}
// END rustc.main.nll.0.mir
// START rustc.main.nll.0.mir
// let _2: &'_#3r usize;
12 changes: 7 additions & 5 deletions src/test/mir-opt/simplify_if.rs
Original file line number Diff line number Diff line change
@@ -5,13 +5,15 @@ fn main() {
}

// END RUST SOURCE
// START rustc.main.SimplifyBranches-initial.before.mir
// START rustc.main.SimplifyBranches-after-copy-prop.before.mir
// bb0: {
// switchInt(const false) -> [false: bb3, otherwise: bb2];
// ...
// switchInt(const false) -> [false: bb3, otherwise: bb1];
// }
// END rustc.main.SimplifyBranches-initial.before.mir
// START rustc.main.SimplifyBranches-initial.after.mir
// END rustc.main.SimplifyBranches-after-copy-prop.before.mir
// START rustc.main.SimplifyBranches-after-copy-prop.after.mir
// bb0: {
// ...
// goto -> bb3;
// }
// END rustc.main.SimplifyBranches-initial.after.mir
// END rustc.main.SimplifyBranches-after-copy-prop.after.mir