Merged
Conversation
Contributor
|
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
matthewjasper
commented
Mar 30, 2019
varkor
reviewed
Apr 2, 2019
src/librustc_mir/build/mod.rs
Outdated
Contributor
There was a problem hiding this comment.
Suggested change
| // type of it's body, which may be a subtype of this type. For | |
| // type of its body, which may be a subtype of this type. For |
Contributor
|
This looks reasonable to me, but I'm not so familiar with the MIR design choices, so it'd be good for someone to double-check. r? @oli-obk |
|
ping from triage @oli-obk waiting for your review on this |
Collaborator
|
☔ The latest upstream changes (presumably #59987) made this pull request unmergeable. Please resolve the merge conflicts. |
95b5423 to
d3518a2
Compare
Collaborator
|
☔ The latest upstream changes (presumably #60224) made this pull request unmergeable. Please resolve the merge conflicts. |
Contributor
|
lgtm. r=me after a rebase sorry about taking so long |
Cast type may be a subtype of the destination type. There is a later assertion that they have the same layout.
Fixes an ICE for the following code:
fn foo(_ : &()) {}
static X: fn(&'static ()) = foo;
This avoids some unnecessary moves
d3518a2 to
e9c687b
Compare
Contributor
Author
|
@bors r=oli-obk |
Collaborator
|
📌 Commit e9c687b has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Apr 25, 2019
…p, r=oli-obk MIR generation cleanup * Handle the case where the body of a constant is a subtype of the type of the constant (see `mir_static_subtype.rs`). * Move the evaluation of `ExprKind::Use` into `into.rs`, saving an unnecessary copy.
bors
added a commit
that referenced
this pull request
Apr 25, 2019
Rollup of 6 pull requests Successful merges: - #59560 (MIR generation cleanup) - #59697 (tweak unresolved label suggestion) - #60038 (Add codegen test for PGO instrumentation.) - #60160 (Fix #58270, fix off-by-one error in error diagnostics.) - #60185 (Reexport IntErrorKind in std) - #60243 (Add regression test for #53249.) Failed merges: r? @ghost
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mir_static_subtype.rs).ExprKind::Useintointo.rs, saving an unnecessary copy.