Uh oh!
There was an error while loading. Please reload this page.
MIR generation cleanup - #59560
Conversation
rust-highfive
commented
Mar 30, 2019
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
| // 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 |
varkor
commented
Apr 2, 2019
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 |
Dylan-DPC-zz
commented
Apr 15, 2019
ping from triage @oli-obk waiting for your review on this |
bors
commented
Apr 20, 2019
☔ The latest upstream changes (presumably #59987) made this pull request unmergeable. Please resolve the merge conflicts. |
95b5423 to
d3518a2Comparebors
commented
Apr 24, 2019
☔ The latest upstream changes (presumably #60224) made this pull request unmergeable. Please resolve the merge conflicts. |
oli-obk
commented
Apr 24, 2019
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
e9c687bComparematthewjasper
commented
Apr 24, 2019
@bors r=oli-obk |
bors
commented
Apr 24, 2019
📌 Commit e9c687b has been approved by |
…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.
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
mir_static_subtype.rs).ExprKind::Useintointo.rs, saving an unnecessary copy.