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

Don't display mut in arguments for functions documentation #81328

Closed

Conversation

LeSeulArtichaut
Copy link
Contributor

This mostly touches rustc_hir_pretty, I don't know who should review this.

Fixes #81289.
r? @jyn514

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 24, 2021
@rust-log-analyzer

This comment has been minimized.

@jyn514
Copy link
Member

jyn514 commented Jan 24, 2021

@LeSeulArtichaut it looks the change might not have worked, the test is failing.

This looks good to me, but I know petrochenkov wants to use rustc_hir_pretty as little as possible, so

r? @petrochenkov

Note that the alternative here is to rewrite half of rustc_hir_pretty (i.e. revert #80799), so I would prefer not to do that.

@rust-highfive rust-highfive assigned petrochenkov and unassigned jyn514 Jan 24, 2021
@LeSeulArtichaut
Copy link
Contributor Author

@LeSeulArtichaut it looks the change might not have worked, the test is failing.

This is actually really dumb: I think the test is failing because of the source link to the file which contains mut 😆
I checked manually (after 53 minutes of compilation), and no mut is present in the function arguments

@rust-log-analyzer

This comment has been minimized.

@petrochenkov
Copy link
Contributor

I suggest reverting #80799 instead and not using HIR pretty-printing in rustdoc (and perhaps simplifying name_from_pat to print less stuff).

The goal of HIR pretty-printing is to print something suitable for debugging, the goal of rustdoc is printing argument names in a way presentable to users.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 24, 2021
@camelid camelid added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Feb 5, 2021
@camelid
Copy link
Member

camelid commented Feb 5, 2021

@LeSeulArtichaut do you want to be the one to do the revert?

@LeSeulArtichaut
Copy link
Contributor Author

Sure.

@LeSeulArtichaut LeSeulArtichaut deleted the 81289-mut-arg branch February 6, 2021 15:31
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Feb 12, 2021
…melid

Don't display `mut` in arguments for functions documentation

Fixes rust-lang#81289 by reverting rust-lang#80799, as requested in rust-lang#81328 (comment).
Supersedes rust-lang#81328.
r? `@camelid` cc `@jyn514`
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Feb 12, 2021
…melid

Don't display `mut` in arguments for functions documentation

Fixes rust-lang#81289 by reverting rust-lang#80799, as requested in rust-lang#81328 (comment).
Supersedes rust-lang#81328.
r? ``@camelid`` cc ``@jyn514``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc documents mut self as mut self: Self
6 participants