Skip to content

rustdoc documents mut self as mut self: Self #81289

Closed

Description

@tesuji

Rustdoc on nightly documents methods have signature of fn(mut self) as fn(mut self: Self) while it only has to document it as fn(self).
image

On rustdoc stable, things are normal:
image

Meta

rustc --version --verbose: Version 1.49.0 (e1884a8 2020-12-29)

Activity

  1. added
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Jan 23, 2021
  2. LeSeulArtichaut commented on Jan 23, 2021

    @LeSeulArtichaut
    Contributor

    I'd like to investigate this :)

  3. LeSeulArtichaut commented on Jan 23, 2021

    @LeSeulArtichaut
    Contributor

    searched nightlies: from nightly-2020-12-29 to nightly-2021-01-22
    regressed nightly: nightly-2021-01-09
    searched commits: from c8915ee to 26438b4
    regressed commit: 9155a9d

    This regressed in #80806, so this is probably caused by #80799

  4. LeSeulArtichaut commented on Jan 23, 2021

    @LeSeulArtichaut
    Contributor

    This also affects

    fn bar(mut foo) {}

    Where rustdoc will generate:

    fn bar(mut foo: Foo)
    
  5. LeSeulArtichaut commented on Jan 23, 2021

    @LeSeulArtichaut
    Contributor

    So a few observations:

  6. LeSeulArtichaut commented on Jan 23, 2021

    @LeSeulArtichaut
    Contributor

    I see two path to solving this bug:

    1. Add an option for rustc_hir_pretty::param_to_string to not display the mutability in patterns
    2. Just revert Get rid of custom pretty-printing in rustdoc #80799

    cc @jyn514 what do you think?

  7. jyn514 commented on Jan 24, 2021

    @jyn514
    Member

    I would prefer to go for 1, there's no reason to have two completely different functions for pretty-printing.

  8. added and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Feb 5, 2021
  9. camelid commented on Feb 5, 2021

    @camelid
    Member

    Assigning P-medium and removing I-prioritize as discussed in the prioritization working group.

  10. added and removed on Feb 12, 2021
  11. camelid commented on Feb 12, 2021

    @camelid
    Member

    (now a beta regression)

  12. added this to the 1.51.0 milestone on Feb 12, 2021
  13. added 2 commits that reference this issue on Feb 12, 2021
    b2c8d7d
    327762f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

C-bugCategory: This is a bug.P-mediumMedium priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions