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 11 pull requests #81660

Merged
merged 30 commits into from
Feb 2, 2021
Merged

Rollup of 11 pull requests #81660

merged 30 commits into from
Feb 2, 2021

Conversation

jonas-schievink
Copy link
Contributor

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

seanchen1991 and others added 30 commits January 23, 2021 11:56
Fixes #81543

After we expand a macro, we try to parse the resulting tokens as a AST
node. This commit makes several improvements to how we handle spans when
an error occurs:

* Only ovewrite the original `Span` if it's a dummy span. This preserves
  a more-specific span if one is available.
* Use `self.prev_token` instead of `self.token` when emitting an error
  message after encountering EOF, since an EOF token always has a dummy
  span
* Make `SourceMap::next_point` leave dummy spans unused. A dummy span
  does not have a logical 'next point', since it's a zero-length span.
  Re-using the span span preserves its 'dummy-ness' for other checks
Almost all of the modules are crate-private, except for
`rustdoc::json::types`, which I believe is intended to be for public
use; and `rustdoc::html::markdown`, which is used externally by the
error-index generator and so has to be public.
`arg_elide` gets initialized, immediately cloned, and only written to after that.
The last reading access was removed back in
7704762
- This allows us add fake information after handling migrations if
  needed.
- Capture analysis also priortizes what we see earlier, which means
  fake information should go in last.
Add lint for 2229 migrations

Implements the first for RFC 2229 where we make the decision to migrate a root variable based on if the type of the variable needs Drop and if the root variable would be moved into the closure when the feature isn't enabled.

r? `@nikomatsakis`
Add Frames Iterator for Backtrace

Second attempt at adding the ability to iterate over the frames of a Backtrace by exposing the frames method.
Add some tests for associated-type-bounds issues

Closes #38917
Closes #40093
Closes #43475
Closes #63591

#47897 is likely closable too, but it needs an MCVE
~~#38917, #40093, #43475, #47897 all are mislabeled and shouldn't have the `F-associated-type-bounds` label~~

~~#71685 is also mislabeled as commented on in that thread~~
…eGomez

rustdoc: Note why `rustdoc::html::markdown` is public

Almost all of the modules are crate-private, except for
`rustdoc::json::types`, which I believe is intended to be for public
use; and `rustdoc::html::markdown`, which is used externally by the
error-index generator and so has to be public.

r? ``@GuillaumeGomez``
Implement `TrustedLen` for `Fuse<I: TrustedLen>`

This looks like it was simply forgotten.
Improve handling of spans around macro result parse errors

Fixes #81543

After we expand a macro, we try to parse the resulting tokens as a AST
node. This commit makes several improvements to how we handle spans when
an error occurs:

* Only ovewrite the original `Span` if it's a dummy span. This preserves
  a more-specific span if one is available.
* Use `self.prev_token` instead of `self.token` when emitting an error
  message after encountering EOF, since an EOF token always has a dummy
  span
* Make `SourceMap::next_point` leave dummy spans unused. A dummy span
  does not have a logical 'next point', since it's a zero-length span.
  Re-using the span span preserves its 'dummy-ness' for other checks
…davidtwco

Remove the remains of query categories

Back in October 2020 in #77830 ``@cjgillot`` removed the query categories information from the profiler, but the actual definitions which query was in which category remained, although unused.
Here I clean that up, to simplify the query definitions even further.

It's unfortunate that this loses all the context for `git blame`, ~~but I'm working on moving those query definitions into `rustc_query_system`, which will lose that context anyway.~~ EDIT: Might not work out.

The functional changes are in the first commit. The second one only changes the indentation.
…r=pickfire

Fix overflowing text on mobile when sidebar is displayed

Fixes #81597.

Before:

![Screenshot from 2021-02-01 17-21-15](https://user-images.githubusercontent.com/3050060/106486857-610b0300-64b2-11eb-96d3-12b939f5b661.png)

After:

![Screenshot from 2021-02-01 17-20-59](https://user-images.githubusercontent.com/3050060/106486840-5cdee580-64b2-11eb-9492-4df27bb39e59.png)

cc `@pickfire`
r? `@Nemo157`
Remove unneeded `mut` variable

`arg_elide` gets initialized, immediately cloned, and only written to after that.
The last reading access was removed back in
7704762
@rustbot rustbot added the rollup A PR which is a rollup label Feb 2, 2021
@jonas-schievink
Copy link
Contributor Author

@bors r+ rollup=never p=11

@bors
Copy link
Contributor

bors commented Feb 2, 2021

📌 Commit 73f859e has been approved by jonas-schievink

@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 Feb 2, 2021
@bors
Copy link
Contributor

bors commented Feb 2, 2021

⌛ Testing commit 73f859e with merge a3ed564...

@bors
Copy link
Contributor

bors commented Feb 2, 2021

☀️ Test successful - checks-actions
Approved by: jonas-schievink
Pushing a3ed564 to master...

@rylev
Copy link
Member

rylev commented Feb 9, 2021

There was a large performance regression in this rollup with the likely culprit being #80629:

@rust-timer make-pr-for a188791

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. rollup A PR which is a rollup 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.