Skip to content

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

ecstatic-morse and others added 14 commits May 7, 2020 11:28
The liveness dataflow analysis now lives in
`librustc_mir/dataflow/impls/liveness.rs`. The borrow-checker has an
abstraction around of "defs" and "uses" that I've made module private. I
would have moved it to `util/def_use.rs`, but there's a slightly
different abstraction used for copy propagation with that name.
…r=oli-obk

Use a single enum for the kind of a const context

This adds a `ConstContext` enum to the `rustc_hir` crate and method that can be called via `tcx.hir()` to get the `ConstContext` for a given body owner. This arose from discussion in rust-lang#71824.

r? @oli-obk
…, r=jonas-schievink

Remove old `util/liveness.rs` module

The liveness dataflow analysis now lives in the `dataflow` module, so this one is no longer necessary. I've copied the relevant bits of the module docs for `util::liveness` to `MaybeLiveLocals`. The example in the docs is now a `mir-dataflow` test: https://github.com/rust-lang/rust/blob/a08c47310c7d49cbdc5d7afb38408ba519967ecd/src/test/ui/mir-dataflow/liveness-ptr.rs#L6-L26

The borrow-checker used the same notion of "defs" and "uses", so I've moved it into a submodule. I would have moved it to `util/def_use.rs`, since it seems generally useful, but there's already a slightly [different version](https://github.com/rust-lang/rust/blob/master/src/librustc_mir/util/def_use.rs) of the same abstraction needed for copy propagation.
Adjust cfg(version) to lang team decision

See rust-lang#64796 (comment) for details

r? @petrochenkov who reviewed the original PR (rust-lang#71314)
Fix some tests failing in `--pass check` mode

r? @RalfJung
Add const-generics test

Taken from rust-lang#71973 as this apparently already compiles.

r? @varkor
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=6

@bors
Copy link
Collaborator

bors commented May 8, 2020

📌 Commit 6789540 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 May 8, 2020
@bors
Copy link
Collaborator

bors commented May 8, 2020

⌛ Testing commit 6789540 with merge 7b80539...

@bors
Copy link
Collaborator

bors commented May 8, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Dylan-DPC
Pushing 7b80539 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 8, 2020
@bors bors merged commit 7b80539 into rust-lang:master May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

8 participants