feat: apply layout rules and safe fixes to RC.2 control flow
This commit is contained in:
1 parent
7282918c50
commit
81fcab0e3a
11 files changed
+621
-323
No files matched your search
@@ -54,15 +54,6 @@ pub struct ControlLayout {
|
||||
pub(crate) body: Vec<BodyStatement>,
|
||||
}
|
||||
|
||||
impl ControlLayout {
|
||||
pub(crate) fn else_carrier(&self) -> Option<&Carrier> {
|
||||
self.arms
|
||||
.last()
|
||||
.filter(|arm| arm.role == ArmRole::Else)
|
||||
.map(|arm| &arm.carrier)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum JumpKind {
|
||||
Break,
|
||||
|
||||
Reference in new issue
Block a user