fix array drop glue: properly turn raw ptr into reference#53536
fix array drop glue: properly turn raw ptr into reference#53536bors merged 1 commit intorust-lang:masterfrom
Conversation
|
📌 Commit 0447b50 has been approved by |
|
I'm not sure how legitimate it is to call |
|
I do not understand -- |
|
Also, I couldn't actually figure out how |
|
rust/src/librustc_mir/util/elaborate_drops.rs Lines 632 to 636 in 1558ae7 The mir that you want to look at is probably the one generated here: Lines 160 to 236 in 6a3db03 |
|
Ah so it moves on to the EDIT: OTOH, I do not see why. If the reference is valid enough for |
fix array drop glue: properly turn raw ptr into reference Discovered while working on #53424: The generated drop glue uses an assignment `ptr = cur` where `ptr` is a reference and `cur` a raw pointer. This is not well-formed MIR. Do we have MIR sanity checks that run on the drop glue and should have caught this? r? @eddyb
|
☀️ Test successful - status-appveyor, status-travis |
Discovered while working on #53424: The generated drop glue uses an assignment
ptr = curwhereptris a reference andcura raw pointer. This is not well-formed MIR.Do we have MIR sanity checks that run on the drop glue and should have caught this?
r? @eddyb