-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 5 pull requests #90422
Conversation
- 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.
…ones which don't have `self` argument)
We still had a number of places where underlined section headings would show up, like under Implementations.
…umeGomez Remove underlines from non-top docblocks. We still had a number of places where underlined section headings would show up, like under Implementations. Follow-up to rust-lang#89506 (thanks `@yaymukund!)` and rust-lang#90036. Related to rust-lang#59829. r? `@camelid` Demo: [Before](https://doc.rust-lang.org/nightly/std/string/struct.String.html#trait-implementations): [![image](https://user-images.githubusercontent.com/220205/138402555-b0c0a3ea-ff50-4aad-bb74-6f9e57323807.png)](https://jacob.hoffman-andrews.com/rust/less-border-bottom-2/std/string/struct.String.html#trait-implementations) [After](https://jacob.hoffman-andrews.com/rust/less-border-bottom-2/std/string/struct.String.html#trait-implementations): [![image](https://user-images.githubusercontent.com/220205/138402669-d0835bd9-8813-4f0c-8697-f86e9759acec.png)](https://jacob.hoffman-andrews.com/rust/less-border-bottom-2/std/string/struct.String.html#trait-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`
@bors: r+ p=5 rollup=never |
📌 Commit 197da45 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e249ce6): comparison url. Summary: This change led to very large relevant regressions 😿 in compiler performance.
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 |
Perf regression is likely due to #90183. |
Successful merges:
is_global
incandidate_should_be_dropped_in_favor_of
#90375 (Useis_global
incandidate_should_be_dropped_in_favor_of
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup