handle TerminatorKind::Yield by returning Err(Unpromotable)
This commit is contained in:
parent
4d1241f515
commit
9e78ce068b
1 changed files with 1 additions and 0 deletions
|
@ -463,6 +463,7 @@ impl<'tcx> Validator<'_, 'tcx> {
|
|||
let terminator = self.body[loc.block].terminator();
|
||||
match &terminator.kind {
|
||||
TerminatorKind::Call { func, args, .. } => self.validate_call(func, args),
|
||||
TerminatorKind::Yield { .. } => Err(Unpromotable),
|
||||
kind => {
|
||||
span_bug!(terminator.source_info.span, "{:?} not promotable", kind);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue