Rollup merge of #72563 - RalfJung:multi-return, r=matthewjasper

multiple Return terminators are possible

@ecstatic-morse mentioned in https://github.com/rust-lang/rust/issues/72515 that multiple `Return` terminators are possible. Update the docs accordingly.

Cc @rust-lang/wg-mir-opt
This commit is contained in:
Ralf Jung 2020-05-30 13:45:11 +02:00 committed by GitHub
commit 6238e79fb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1072,7 +1072,8 @@ pub enum TerminatorKind<'tcx> {
Abort,
/// Indicates a normal return. The return place should have
/// been filled in by now. This should occur at most once.
/// been filled in before this executes. This can occur multiple times
/// in different basic blocks.
Return,
/// Indicates a terminator that can never be reached.