-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
trans: Add early-out when translating unreachable controlflow expressions. #23066
Conversation
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -83,3 +163,5 @@ fn main() { | |||
fn diverge() -> ! { | |||
panic!(); | |||
} | |||
|
|||
fn some_predicate() -> bool { true || false } |
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.
no newline at end of file
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.
Thanks, fixed that.
52e6a1b
to
e05c2f8
Compare
r? @pnkfelix |
@bors r+ |
📌 Commit e05c2f8 has been approved by |
@bors rollup |
…pnkfelix This PR solves rust-lang#21559 by making sure that unreachable if-expressions are not further translated. Could someone who knows their way around `trans` take a look at the changes in `controlflow.rs`? I'm not sure if any other code relies on any side-effects of translating unreachable things. cc @nikomatsakis @nrc @eddyb
This PR solves #21559 by making sure that unreachable if-expressions are not further translated.
Could someone who knows their way around
trans
take a look at the changes incontrolflow.rs
? I'm not sure if any other code relies on any side-effects of translating unreachable things.cc @nikomatsakis @nrc @eddyb