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

rustdoc: add support for incoherent impls on structs and traits #103746

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

notriddle
Copy link
Contributor

Fixes #103170

@rustbot
Copy link
Collaborator

rustbot commented Oct 29, 2022

r? @jsha

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 29, 2022
@Mark-Simulacrum Mark-Simulacrum added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 29, 2022
// * https://github.com/rust-lang/rust/issues/103170 — where it didn't used to get documented
// * https://github.com/rust-lang/rust/pull/99917 — where the feature got used
// * https://github.com/rust-lang/rust/issues/53487 — overall tracking issue for Error
if tcx.has_attr(did, sym::rustc_has_incoherent_inherent_impls) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the issue will remain for the JSON output if we fix it in inline, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only a problem in the HTML output because, if inlining isn’t performed, there’s nowhere to actually show it. JSON directly represents impl blocks as their own item, rather than attaching them to their types, so all it needs to do is not strip them out.

If there’s a problem in JSON output, the solution is going to be totally different and should probably be a separate PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! So no need for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably still want to add a test case for JSON output on incoherent impl, but, again, separate PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, totally fine.

@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 30, 2022

📌 Commit 3195388 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors 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 Oct 30, 2022
notriddle added a commit to notriddle/rust that referenced this pull request Oct 30, 2022
…-trait, r=GuillaumeGomez

rustdoc: add support for incoherent impls on structs and traits

Fixes rust-lang#103170
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 31, 2022
Rollup of 8 pull requests

Successful merges:

 - rust-lang#97971 (Enable varargs support for calling conventions other than C or cdecl )
 - rust-lang#101428 (Add mir building test directory)
 - rust-lang#101944 (rustdoc: clean up `#toggle-all-docs`)
 - rust-lang#102101 (check lld version to choose correct option to disable multi-threading in tests)
 - rust-lang#102689 (Add a tier 3 target for the Sony PlayStation 1)
 - rust-lang#103746 (rustdoc: add support for incoherent impls on structs and traits)
 - rust-lang#103758 (Add regression test for reexports in search results)
 - rust-lang#103764 (All verbosity checks in `PrettyPrinter` now go through `PrettyPrinter::should_print_verbose`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c61a32a into rust-lang:master Oct 31, 2022
@rustbot rustbot added this to the 1.67.0 milestone Oct 31, 2022
@Mark-Simulacrum Mark-Simulacrum added beta-accepted Accepted for backporting to the compiler in the beta channel. and removed beta-nominated Nominated for backporting to the compiler in the beta channel. labels Oct 31, 2022
@Mark-Simulacrum Mark-Simulacrum modified the milestones: 1.67.0, 1.65.0 Oct 31, 2022
This was referenced Oct 31, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 31, 2022
…Simulacrum

[stable] 1.67.0 release

Last minute backports:

* rustdoc: add support for incoherent impls on structs and traits rust-lang#103746

r? `@ghost`
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 1, 2022
…mulacrum

[beta] branch 1.66

This PR:

* Bumps version placeholders
* Bumps CI channel to beta
* Backports "rustdoc: add support for incoherent impls on structs and traits rust-lang#103746"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

std::error::Error docs don't mention e.downcast() (only downcast_{ref,mut})
6 participants