Skip to content

rustdoc: Remove the brief of structs and traits #39952

Closed
@ishitatsuyuki

Description

@ishitatsuyuki

Traits and structs brief should be removed: its functionality can be achieved through pressing the [-] button.

Things that are not expressed through the "methods/fields" doucment:

  • indication of default implementation on traits: once the brief is removed, we should add an indicator instead to the function line.
  • indication of private fields in a struct: we can add a note instead.
Original proposal (superseded)

Current:

pub struct Vec<T> { /* fields omitted */ }

Desired:

pub struct Vec<T> { /* fields omitted */ }

impl<T> Vec<T> {
    fn new() -> Vec<T>;
}

impl<T> IntoIterator for Vec<T>;
impl<T> Index<usize> for Vec<T>;

EDIT: as @sinkuu mentioned below, we have a way to display a well formatted brief by minimizing the descriptions.
We have another option, by removing the brief for traits and advertise the use of [-].

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.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