-
Notifications
You must be signed in to change notification settings - Fork 13.8k
MIR drive-by cleanups #111501
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
MIR drive-by cleanups #111501
Changes from all commits
5ae51d6
03d5f9b
f542778
140cdcb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,8 @@ | |
|
||
fn main() { | ||
let y = &5; | ||
let x: ! = unsafe { | ||
*(y as *const _ as *const !) //~ ERROR: entering unreachable code | ||
}; | ||
f(x) | ||
let x: ! = unsafe { *(y as *const _ as *const !) }; | ||
f(x) //~ ERROR: entering unreachable code | ||
} | ||
|
||
|
||
fn f(x: !) -> ! { | ||
|
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.
Can you put this in a different file? This one's mostly for type definitions
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.
There are similar functions in this file though, like
MirPhase::name
...Not sure where to best put this
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.
Hmm, ok. We should probably move those out too, don't worry about it for this PR though
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.
The mir::terminator file looks like a proper place.