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: generated documentation doesn't include Sized #75413

Closed
quantatic opened this issue Aug 11, 2020 · 1 comment
Closed

Rustdoc: generated documentation doesn't include Sized #75413

quantatic opened this issue Aug 11, 2020 · 1 comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@quantatic
Copy link

In generated Rustdoc documentation, it would make sense to show whether a type is Sized or not.

Looking at the documentation for slice (which is !Sized) and Cell (which is Sized), we see no reference to Sized in either location.

DSTs may largely be second class citizens at the moment, but it would still be useful to surface this information in the docs.

As I see it, there's two options which make sense:

  1. Simply show Sized on all Sized types.
  2. Instead, show nothing on Sized types and show !Sized on non-Sized types.

The first option is more in line with the way that the rest of the traits are surfaced. but may be somewhat confusing (in that Sized is special because it's implied to be implemented, unless you specifically specify otherwise in trait bounds).

The second option is more in line with the way we think about Sized with respect to bounds, but also seems confusing in that negative trait bounds are not a supported feature.

@jonas-schievink jonas-schievink added C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 11, 2020
@jyn514
Copy link
Member

jyn514 commented Nov 4, 2020

Duplicate of #24183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants