Remove ConstGoto and SeparateConstSwitch.

This commit is contained in:
Camille GILLOT 2023-02-26 13:42:28 +00:00
parent e132cac3c4
commit 014b29eecf
15 changed files with 125 additions and 733 deletions

View file

@ -6,7 +6,7 @@
use std::ops::ControlFlow;
// EMIT_MIR separate_const_switch.too_complex.SeparateConstSwitch.diff
// EMIT_MIR separate_const_switch.too_complex.JumpThreading.diff
fn too_complex(x: Result<i32, usize>) -> Option<i32> {
// The pass should break the outer match into
// two blocks that only have one parent each.
@ -23,7 +23,7 @@ fn too_complex(x: Result<i32, usize>) -> Option<i32> {
}
}
// EMIT_MIR separate_const_switch.identity.SeparateConstSwitch.diff
// EMIT_MIR separate_const_switch.identity.JumpThreading.diff
fn identity(x: Result<i32, i32>) -> Result<i32, i32> {
Ok(x?)
}