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

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

Closed
thomcc opened this issue Oct 18, 2022 · 2 comments · Fixed by #103746
Closed

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

thomcc opened this issue Oct 18, 2022 · 2 comments · Fixed by #103746
Labels
A-error-handling Area: Error handling C-feature-request Category: A feature request, i.e: not implemented / a PR. regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@thomcc
Copy link
Member

thomcc commented Oct 18, 2022

I didn't notice an issue on file for this already, feel free to dupe against it if one exists.

In #99917 we landed support for error in core, and sadly one of the casualties was the docs got somewhat worse. Concretely, Box<dyn Error + stuff>::downcast() is no longer shown on the docs page for Error, which is a bit of a bummer, since these methods do exist: https://doc.rust-lang.org/nightly/src/alloc/boxed.rs.html#2127

@thomcc thomcc added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-error-handling Area: Error handling T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 18, 2022
@jyn514
Copy link
Member

jyn514 commented Oct 27, 2022

I don't think rustdoc supports incoherent impls like this except for primitives.

@thomcc
Copy link
Member Author

thomcc commented Oct 27, 2022

That's unfortunate. Error is an important trait, and its docs are notably worse after that PR. If supporting that is too hard, it might be worth special-casing it (Failing that, manually documenting this stuff is an option I suppose).

@jyn514 jyn514 added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Oct 27, 2022
@notriddle notriddle added the regression-from-stable-to-beta Performance or correctness regression from stable to beta. label Oct 29, 2022
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 29, 2022
notriddle added a commit to notriddle/rust that referenced this issue Oct 30, 2022
…-trait, r=GuillaumeGomez

rustdoc: add support for incoherent impls on structs and traits

Fixes rust-lang#103170
notriddle added a commit to notriddle/rust that referenced this issue Oct 31, 2022
…-trait, r=GuillaumeGomez

rustdoc: add support for incoherent impls on structs and traits

Fixes rust-lang#103170
@bors bors closed this as completed in 3195388 Oct 31, 2022
Mark-Simulacrum pushed a commit to Mark-Simulacrum/rust that referenced this issue Oct 31, 2022
Mark-Simulacrum pushed a commit to Mark-Simulacrum/rust that referenced this issue Oct 31, 2022
@inquisitivecrystal inquisitivecrystal removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-error-handling Area: Error handling C-feature-request Category: A feature request, i.e: not implemented / a PR. regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants