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

Hide Error::description and cause methods #66859

Closed
wants to merge 1 commit into from

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Nov 29, 2019

description has been documented as soft-deprecated since 1.27.0, cause has been documented as deprecated since 1.30.0 and has produced deprecation warnings since 1.33.0. There is no longer any reason to call or implement either of these methods. Now it's a year or a year and a half later and there is less and less reason over time to even know about either one.

This commit adds #[doc(hidden)] to Error::description and Error::cause to keep them out of the standard library's API documentation.

Description has been documented as soft-deprecated since 1.27.0, cause
has been documented as deprecated since 1.30.0 and has produced
deprecation warnings since 1.33.0. There is no longer any reason to call
or implement either of these methods. Now it's a year or a year and a
half later and there is less and less reason over time to even know
about either one.

This commit adds #[doc(hidden)] to Error::description and Error::cause
to keep them out of the standard library's API documentation.
@dtolnay dtolnay added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Nov 29, 2019
@rust-highfive
Copy link
Collaborator

r? @Kimundi

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 29, 2019
@dtolnay
Copy link
Member Author

dtolnay commented Nov 29, 2019

@rfcbot poll @rust-lang/libs hide them?

@rfcbot
Copy link

rfcbot commented Nov 29, 2019

Team member @dtolnay has asked teams: T-libs, for consensus on:

hide them?

@sfackler
Copy link
Member

Shouldn't we actually-deprecate description?

I don't really like hiding deprecated APIs - it just makes things confusing when you're trying to figure out where some method comes from.

@dtolnay
Copy link
Member Author

dtolnay commented Dec 1, 2019

Okay that's fair -- I opened #66919 as an alternative which keeps them visible.

@Dylan-DPC-zz
Copy link

@Amanieu @Kimundi @KodrAus @sfackler @withoutboats waiting for your consensus on the poll above

@tesuji
Copy link
Contributor

tesuji commented Dec 10, 2019

I think another solution is preferred in #66919 @Dylan-DPC

@withoutboats
Copy link
Contributor

Closing this because #66919 is in FCP and is the clear preference of the libs team

@dtolnay dtolnay deleted the hidden branch December 11, 2019 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants