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 #90422

Merged
merged 22 commits into from
Oct 30, 2021
Merged

Rollup of 5 pull requests #90422

merged 22 commits into from
Oct 30, 2021

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

matthewjasper and others added 22 commits October 21, 2021 22:07
- Always use the ExpnId serialized to `tables`
- Use the Id for traits and enums from other crates in resolution.
This will potentially hide a few correct suggestions, but importing
these items from another module is not generally possible.
This manifistated in rust-lang#90195 with compiler being unable to keep
one candidate for a trait impl, if where is a global impl and more
than one trait bound in the where clause.

Before rust-lang#87280 `candidate_should_be_dropped_in_favor_of` was using
`TypeFoldable::is_global()` that was enough to discard the two
`ParamCandidate`s. But rust-lang#87280 changed it to use
`TypeFoldable::is_known_global()` instead, which is pessimistic, so
now the compiler drops the global impl instead (because
`is_known_global` is not sure) and then can't decide between the
two `ParamCandidate`s.

Switching it to use `is_global` again solves the issue.

Fixes rust-lang#90195.
This avoids having to decode 2 `Lazy`s when decoding a modules exports.
We still had a number of places where underlined section headings would
show up, like under Implementations.
Show all Deref implementations recursively

Fixes rust-lang#87783.

This is a re-implementation of rust-lang#80653, so taking the original PR comment:

This changes `rustdoc` to recursively follow `Deref` targets so that methods from all levels are added to the rendered output. This implementation displays the methods from all levels in the expanded state with separate sections for each level.

![image](https://user-images.githubusercontent.com/279572/103482863-46723b00-4ddb-11eb-972b-c463351a425c.png)

cc `@camelid`
r? `@jyn514`
…rochenkov

Improve and test cross-crate hygiene

- Decode the parent expansion for traits and enums in `rustc_resolve`, this was already being used for resolution in typeck
- Avoid suggesting importing names with def-site hygiene, since it's often not useful
- Add more tests

r? `@petrochenkov`
Use `is_global` in `candidate_should_be_dropped_in_favor_of`

This manifistated in rust-lang#90195 with compiler being unable to keep
one candidate for a trait impl, if where is a global impl and more
than one trait bound in the where clause.

Before rust-lang#87280 `candidate_should_be_dropped_in_favor_of` was using
`TypeFoldable::is_global()` that was enough to discard the two
`ParamCandidate`s. But rust-lang#87280 changed it to use
`TypeFoldable::is_known_global()` instead, which is pessimistic, so
now the compiler drops the global impl instead (because
`is_known_global` is not sure) and then can't decide between the
two `ParamCandidate`s.

Switching it to use `is_global` again solves the issue.

Fixes rust-lang#90195.
…agnostic, r=estebank

Skipping verbose diagnostic suggestions when calling .as_ref() on type not implementing AsRef

Addresses rust-lang#89806

Skipping suggestions when calling `.as_ref()` for types that do not implement the `AsRef` trait.

r? `@estebank`
@rustbot rustbot added the rollup A PR which is a rollup label Oct 30, 2021
@GuillaumeGomez
Copy link
Member Author

@bors: r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Oct 30, 2021

📌 Commit 197da45 has been approved by GuillaumeGomez

@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 Oct 30, 2021
@bors
Copy link
Contributor

bors commented Oct 30, 2021

⌛ Testing commit 197da45 with merge e249ce6...

@bors
Copy link
Contributor

bors commented Oct 30, 2021

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing e249ce6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 30, 2021
@bors bors merged commit e249ce6 into rust-lang:master Oct 30, 2021
@rustbot rustbot added this to the 1.58.0 milestone Oct 30, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e249ce6): comparison url.

Summary: This change led to very large relevant regressions 😿 in compiler performance.

  • Very large regression in instruction counts (up to 5.8% on full builds of tokio-webpush-simple)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression

@rustbot rustbot added the perf-regression Performance regression. label Oct 31, 2021
@GuillaumeGomez GuillaumeGomez deleted the rollup-s1mdag0 branch October 31, 2021 11:34
@camelid
Copy link
Member

camelid commented Oct 31, 2021

Perf regression is likely due to #90183.

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. perf-regression Performance regression. 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.

8 participants