Skip to content

Rustdoc: generated documentation doesn't include Sized #75413

Closed
@quantatic

Description

@quantatic

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions