Skip to content

Rollup of 6 pull requests - #69012

Merged
bors merged 20 commits into
rust-lang:masterfrom
Dylan-DPC-zz:rollup-13qn0fq
Feb 10, 2020
Merged

Rollup of 6 pull requests#69012
bors merged 20 commits into
rust-lang:masterfrom
Dylan-DPC-zz:rollup-13qn0fq

Conversation

@Dylan-DPC-zz

Copy link
Copy Markdown

Successful merges:

Failed merges:

r? @ghost

ecstatic-morseand others added 20 commits February 8, 2020 16:02
Now the line for each statement will show the diff resulting from the
combination of `before_statement_effect` and `statement_effect`. It's
still possible to observe each in isolation via
`borrowck_graphviz_format = "two_phase"`.
including their unnormalized forms.
Add more documentation for them.
`InferCtxt` contains six structures within `RefCell`s. Every time we
create and dispose of (commit or rollback) a snapshot we have to
`borrow_mut` each one of them.
This commit moves the six structures under a single `RefCell`, which
gives significant speed-ups by reducing the number of `borrow_mut`
calls. To avoid runtime errors I had to reduce the lifetimes of dynamic
borrows in a couple of places.
This has negligible perf impact, but it does improve the code a bit.
* Only query the specialization graph of any trait once instead of once per
impl
* Loop over impls only once, precomputing impl DefId and TraitRef
This was showing up in profiles. Also deduplicates the code to get just
the impl header span.
This was previously a future-compat warning that has since been turned into
hard error, but without actually removing all the code.
Avoids a call to `traits::overlapping_impls`, which is expensive.
…rCtxt, r=varkor
Reduce the number of `RefCell`s in `InferCtxt`.
`InferCtxt` contains six structures within `RefCell`s. Every time we
create and dispose of (commit or rollback) a snapshot we have to
`borrow_mut` each one of them.
This commit moves the six structures under a single `RefCell`, which
gives significant speed-ups by reducing the number of `borrow_mut`
calls. To avoid runtime errors I had to reduce the lifetimes of dynamic
borrows in a couple of places.
r? @varkor
…arkor
Improve performance of coherence checks
The biggest perf improvement in here is expected to come from the removal of the remaining rust-lang#43355 warning code since that effectively runs the expensive parts of coherence *twice*, which can even be visualized by obtaining a flamegraph:
![image](https://user-images.githubusercontent.com/5047365/74091959-e1f41200-4a8b-11ea-969d-2849d3f86c63.png)
…olnay
Make `num::NonZeroX::new` an unstable `const fn`
cc rust-lang#53718
These require `#[feature(const_if_match)]`, meaning they must remain unstable for the time being.
…phviz, r=wesleywiser
Small graphviz improvements for the new dataflow framework
Split out from rust-lang#68241. This prints the correct effect diff for each line (the before-effect and the after-effect) and makes marginal improvements to the graphviz output for the new dataflow framework including using monospaced font and better line breaking. This will only be useful when rust-lang#68241 is merged and the graphviz output changes from this:
![image](https://user-images.githubusercontent.com/29463364/74107776-5e3c3300-4b28-11ea-9d33-4862228b5e87.png)
to this:
![image](https://user-images.githubusercontent.com/29463364/74107751-20d7a580-4b28-11ea-99ca-24f749386601.png)
r? @wesleywiser
parser: Keep current and previous tokens precisely
...including their unnormalized forms.
Add more documentation for them.
Hopefully, this will help to eliminate footguns like rust-lang#68728 (comment).
I'll try to address the FIXMEs in separate PRs during the next week.
r? @Centril
@Dylan-DPC-zz

Copy link
Copy Markdown
Author

@bors r+ rollup=never p=6

@bors

bors commented Feb 10, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 18c6d39 has been approved by Dylan-DPC

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 10, 2020
@Dylan-DPC-zzDylan-DPC-zz added the rollup A PR which is a rollup label Feb 10, 2020
@bors

bors commented Feb 10, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 18c6d39 with merge c508e9f244f9d5f23ba0541e1c3b3b8381355fe7...

@bors

bors commented Feb 10, 2020

Copy link
Copy Markdown
Collaborator

💥 Test timed out

@borsbors 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 Feb 10, 2020
@Centril

Copy link
Copy Markdown
Contributor

@bors retry

@borsbors 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 Feb 10, 2020
@jonas-schievink

Copy link
Copy Markdown
Contributor

@bors retry

queue's stuck?

@bors

bors commented Feb 10, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 18c6d39 with merge 4d1241f...

bors added a commit that referenced this pull request Feb 10, 2020
Rollup of 6 pull requests
Successful merges:
- #68694 (Reduce the number of `RefCell`s in `InferCtxt`.)
- #68966 (Improve performance of coherence checks)
- #68976 (Make `num::NonZeroX::new` an unstable `const fn`)
- #68992 (Correctly parse `mut a @ b`)
- #69005 (Small graphviz improvements for the new dataflow framework)
- #69006 (parser: Keep current and previous tokens precisely)
Failed merges:
r? @ghost
@bors

bors commented Feb 10, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-azure
Approved by: Dylan-DPC
Pushing 4d1241f to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Feb 10, 2020
@bors
bors merged commit 18c6d39 into rust-lang:masterFeb 10, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: 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.

9 participants

@Dylan-DPC-zz@bors@Centril@jonas-schievink@ecstatic-morse@matthewjasper@petrochenkov@nnethercote@Dylan-DPC