-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove ScopeTarget and LoopIdResult #50750
Conversation
src/librustc_typeck/check/mod.rs
Outdated
@@ -3730,7 +3730,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { | |||
tcx.mk_nil() | |||
} | |||
hir::ExprBreak(destination, ref expr_opt) => { | |||
if let Some(target_id) = destination.target_id.opt_id() { | |||
if let Some(target_id) = destination.target_id.ok() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can pattern-match on Ok
instead.
@bors r+ |
📌 Commit f7a0800 has been approved by |
☔ The latest upstream changes (presumably #50351) made this pull request unmergeable. Please resolve the merge conflicts. |
When we want to implement label-break-value, we can't really decide whether to emit ScopeTarget::Loop or ScopeTarget::Block in the code that is supposed to create it. So we get rid of it and reconstruct the information when needed.
It's redundant as Result already implements Encodable as well as Decodable.
rebased. re-r? @eddyb |
@bors r+ |
📌 Commit 4d328f7 has been approved by |
☀️ Test successful - status-appveyor, status-travis |
r? @eddyb