hir
: Add Become
expression kind
This commit is contained in:
parent
97bf23d26b
commit
ccb71ff424
28 changed files with 268 additions and 72 deletions
|
@ -695,6 +695,11 @@ impl<'tcx> Cx<'tcx> {
|
|||
ExprKind::Repeat { value: self.mirror_expr(v), count: *count }
|
||||
}
|
||||
hir::ExprKind::Ret(ref v) => ExprKind::Return { value: v.map(|v| self.mirror_expr(v)) },
|
||||
hir::ExprKind::Become(call) => {
|
||||
// FIXME(explicit_tail_calls): use `ExprKind::Become` once we implemented it
|
||||
// Temporary transform `become` into a `return`, so we can write tests for code before this stage
|
||||
ExprKind::Return { value: Some(self.mirror_expr(call)) }
|
||||
}
|
||||
hir::ExprKind::Break(dest, ref value) => match dest.target_id {
|
||||
Ok(target_id) => ExprKind::Break {
|
||||
label: region::Scope { id: target_id.local_id, data: region::ScopeData::Node },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue