Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

multiple Return terminators are possible #72563

Merged
merged 1 commit into from
May 30, 2020
Merged

Conversation

RalfJung
Copy link
Member

@ecstatic-morse mentioned in #72515 that multiple Return terminators are possible. Update the docs accordingly.

Cc @rust-lang/wg-mir-opt

@rust-highfive
Copy link
Collaborator

r? @matthewjasper

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 25, 2020
@jonas-schievink
Copy link
Contributor

I'd say that there are no restrictions at all on this terminator, instead of tying it to generators. For example, there were discussions about adding a pass that propagates terminators backwards, I believe, which would also duplicate Return.

Is there a reason to only have a single Return?

@wesleywiser
Copy link
Member

There was some discussion about this here #72022 (comment)

@RalfJung
Copy link
Member Author

I'd say that there are no restrictions at all on this terminator, instead of tying it to generators. For example, there were discussions about adding a pass that propagates terminators backwards, I believe, which would also duplicate Return.

Okay, I adjusted the comment accordingly.

@matthewjasper
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 30, 2020

📌 Commit 8ef9392 has been approved by matthewjasper

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 30, 2020
@RalfJung
Copy link
Member Author

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request May 30, 2020
Rollup of 9 pull requests

Successful merges:

 - rust-lang#72299 (more `LocalDefId`s)
 - rust-lang#72368 (Resolve overflow behavior for RangeFrom)
 - rust-lang#72441 (Fix ICE with explicit late-bound lifetimes)
 - rust-lang#72499 (Override Box::<[T]>::clone_from)
 - rust-lang#72521 (Properly handle InlineAsmOperand::SymFn when collecting monomorphized items)
 - rust-lang#72540 (mir: adjust conditional in recursion limit check)
 - rust-lang#72563 (multiple Return terminators are possible)
 - rust-lang#72585 (Only capture tokens for items with outer attributes)
 - rust-lang#72607 (Eagerly lower asm sub-expressions to HIR even if there is an error)

Failed merges:

r? @ghost
@bors bors merged commit 6238e79 into rust-lang:master May 30, 2020
@RalfJung RalfJung deleted the multi-return branch May 30, 2020 16:41
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants