Skip to content
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

Rollup of 5 pull requests #71513

Closed
wants to merge 15 commits into from

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

ecstatic-morse and others added 15 commits April 22, 2020 18:24
There is no `Arc::map` equivalent to `LockGuard::map`
...instead of a `LockGuard` which means the lock is held for longer than
necessary.
This was needed by an early version of dataflow-based const
qualification where `QualifCursor` needed to return a full `BitSet` with
the current state.
Signed-off-by: Rustin-Liu <[email protected]>
…=oli-obk

Only run dataflow for const qualification if type-based check would fail

This is the optimization discussed in rust-lang#49146 (comment). We wait for `Qualif::in_any_value_of_ty` to return `true` before running dataflow. For bodies that deal mostly with primitive types, this will avoid running dataflow at all during const qualification.

This also removes the `BitSet` used to cache `in_any_value_of_ty` for each local, which was only necessary for an old version of rust-lang#64470 that also handled promotability.
…he-arc, r=nikomatsakis

Don't hold the predecessor cache lock longer than necessary

rust-lang#71044 returns a `LockGuard` with the predecessor cache to callers of `Body::predecessors`. As a result, the lock around the predecessor cache could be held for an arbitrarily long time. This PR uses reference counting for ownership of the predecessor cache, meaning the lock is only ever held within `PredecessorCache::compute`. Checking this API for potential sources of deadlock is much easier now, since we no longer have to consider its consumers, only its internals.

This required removing `predecessors_for`, since there is no equivalent to `LockGuard::map` for `Arc` and `Rc`. I believe this could be emulated with `owning_ref::{Arc,Rc}Ref`, but I don't think it's necessary. Also, we continue to return an opaque type from `Body::predecessors` with the lifetime of the `Body`, not `'static`.

This depends on rust-lang#71044. Only the last two commits are new.

r? @nikomatsakis
…r=Dylan-DPC

Improve PanicInfo examples readability

cc @Eijebong

r? @Dylan-DPC
…manieu

Add BinaryHeap::retain as suggested in rust-lang#42849

This PR implements retain for BinaryHeap as suggested in rust-lang#42849.

This is my first PR for Rust, so please let me know if I should be doing anything differently, thanks!
…r=Mark-Simulacrum

Remove useless "" args

Signed-off-by: Rustin-Liu <[email protected]>
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Apr 24, 2020

📌 Commit fa09324 has been approved by Dylan-DPC

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 24, 2020
@bors
Copy link
Contributor

bors commented Apr 24, 2020

⌛ Testing commit fa09324 with merge b9d96cadabe5445deffe956325127ac2b89132ce...

@bors
Copy link
Contributor

bors commented Apr 24, 2020

💥 Test timed out

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

@bors retry

@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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 24, 2020
@bors
Copy link
Contributor

bors commented Apr 24, 2020

⌛ Testing commit fa09324 with merge 2806991763264075d2d00288d07efb6017d172d5...

@Dylan-DPC-zz
Copy link
Author

@bors retry (resized)

@Dylan-DPC-zz Dylan-DPC-zz deleted the rollup-5o6u2im branch April 24, 2020 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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.

6 participants