Skip to content

Clean up and add tests for slice drop shims #59348

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
May 10, 2019

Conversation

matthewjasper
Copy link
Contributor

@matthewjasper matthewjasper commented Mar 21, 2019

Adds a test for the MIR generated by real_drop_in_place::<[T]>. Also slightly reduces the number of statements and locals used in the shim.

r? @RalfJung

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 21, 2019
@RalfJung
Copy link
Member

I'm afraid I am not familiar with the drop shim code at all, I just did a few tiny changes to make Miri happy. I am not confident reviewing this. Sorry.

Also, does the test pass the same way currently? Would be nice to use that test to see the effect of your changes.

@matthewjasper
Copy link
Contributor Author

Maybe @arielb1 could have a look.

@Dylan-DPC-zz Dylan-DPC-zz added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 8, 2019
@Dylan-DPC-zz
Copy link

bors: try
r? @arielb1

@rust-highfive rust-highfive assigned arielb1 and unassigned RalfJung Apr 8, 2019
@matthewjasper
Copy link
Contributor Author

r? @oli-obk

@rust-highfive rust-highfive assigned oli-obk and unassigned arielb1 Apr 28, 2019
@bors
Copy link
Collaborator

bors commented May 1, 2019

☔ The latest upstream changes (presumably #60195) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 1, 2019
assert!(size <= (u32::MAX as u64),
"move out check doesn't implemented for array bigger then u32");
let size = size as u32;
let size: u32 = size.try_into().unwrap_or_else(|_| {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

let loop_block = self.drop_loop(
succ,
self.succ,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool!

@arielb1
Copy link
Contributor

arielb1 commented May 9, 2019

Nice cleanup.

@bors r+

@bors
Copy link
Collaborator

bors commented May 9, 2019

📌 Commit 6fff547 has been approved by arielb1

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 9, 2019
Centril added a commit to Centril/rust that referenced this pull request May 9, 2019
…=arielb1

Clean up and add tests for slice drop shims

Adds a test for the MIR generated by `real_drop_in_place::<[T]>`. Also slightly reduces the number of statements and locals used in the shim.

r? @RalfJung
bors added a commit that referenced this pull request May 10, 2019
Rollup of 8 pull requests

Successful merges:

 - #59348 (Clean up and add tests for slice drop shims)
 - #60188 (Identify when a stmt could have been parsed as an expr)
 - #60234 (std: Derive `Default` for `io::Cursor`)
 - #60618 (Comment ext::tt::transcribe)
 - #60648 (Skip codegen for one UI test with long file path)
 - #60671 (remove unneeded `extern crate`s from build tools)
 - #60675 (Remove the old await! macro)
 - #60676 (Fix async desugaring providing wrong input to procedural macros.)

Failed merges:

r? @ghost
@bors
Copy link
Collaborator

bors commented May 10, 2019

⌛ Testing commit 6fff547 with merge 03bd2f6...

@bors bors merged commit 6fff547 into rust-lang:master May 10, 2019
@matthewjasper matthewjasper deleted the cleanup-drop-shims branch July 29, 2019 19:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants