Don't document impossible to call default trait items on impls by compiler-error...
source link: https://github.com/rust-lang/rust/pull/100221
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
Closes #100176
This only skips documenting default trait items on impls, not ones that are written inside the impl block. This is a conservative approach, since I think we should document all items written in an impl block (I guess unless hidden or whatever), but the existence of this new query I added makes this easy to extend to other rustdoc cases.
added T-compiler Relevant to the compiler 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.
labels
Collaborator
rust-highfive commented 13 days ago
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label
Member
Author
compiler-errors commented 13 days ago
cc @notriddle, would appreciate a review on the rustdoc part! |
Contributor
lcnr commented 13 days ago
the impl looks good, leaving the final review to rustdoc r? rustdoc |
The code seems fine to me, but I’d like confirmation from at least one other rustdoc team member that this is the right solution at all. That we actually want to hide these methods, instead of doing something else, like slapping a label on them. |
Member
camelid left a comment
This seems like the right approach to me. From the user's perspective, it's as if the method doesn't exist for that type. I think still displaying the method but adding a label would be more confusing.
Member
camelid commented 12 days ago
@bors r=lcnr,notriddle,camelid |
Contributor
bors commented 12 days ago
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
Member
camelid commented 12 days ago
Inherent methods with impossible bounds (e.g.
|
@camelid: I actually meant trait items provided by an impl explicitly, like:
But that's also impossible to write currently, lol
|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Successfully merging this pull request may close these issues.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK