Skip to content

Deal with libcore/libstd doc duplication on primitives #30214

Closed
@alexcrichton

Description

@alexcrichton

Right now there are a number of extension traits in libcore that are being stabilized, including:

  • SliceExt
  • StrExt
  • CharExt
  • Float

These all currently have very little or no documentation because all the actual docs live elsewhere (e.g. libcollections, libstd, librustc_unicode, etc). When browsing the libcore-only docs, however, this may be a bit jarring, so we may want to resolve this somehow. A few strategies possible are:

  1. Duplicate all the docs. Pros are that it's all there where you need it, cons are that the two will inevitably get out of sync and duplication is always bad.
  2. Add links from core docs to std docs. Pros are that it's easy to maintain and add new APIs without excessive duplication, cons are that you've gotta click to see the docs.
  3. Automatically merge std docs into core. Pros are that it's easy to maintain and you've got everything where you need it, cons are that it's difficult to implement.

I'd vote for route (2) personally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.P-mediumMedium priorityT-libs-apiRelevant to the library API 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