thir
: Add Become
expression kind
This commit is contained in:
parent
b5e51db16d
commit
c60fb12a35
11 changed files with 32 additions and 9 deletions
|
@ -241,7 +241,8 @@ fn recurse_build<'tcx>(
|
|||
ExprKind::Assign { .. } | ExprKind::AssignOp { .. } => {
|
||||
error(GenericConstantTooComplexSub::AssignNotSupported(node.span))?
|
||||
}
|
||||
ExprKind::Closure { .. } | ExprKind::Return { .. } => {
|
||||
// FIXME(explicit_tail_calls): maybe get `become` a new error
|
||||
ExprKind::Closure { .. } | ExprKind::Return { .. } | ExprKind::Become { .. } => {
|
||||
error(GenericConstantTooComplexSub::ClosureAndReturnNotSupported(node.span))?
|
||||
}
|
||||
// let expressions imply control flow
|
||||
|
@ -337,6 +338,7 @@ impl<'a, 'tcx> IsThirPolymorphic<'a, 'tcx> {
|
|||
| thir::ExprKind::Break { .. }
|
||||
| thir::ExprKind::Continue { .. }
|
||||
| thir::ExprKind::Return { .. }
|
||||
| thir::ExprKind::Become { .. }
|
||||
| thir::ExprKind::Array { .. }
|
||||
| thir::ExprKind::Tuple { .. }
|
||||
| thir::ExprKind::Adt(_)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue