You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rustdoc documents mut self as mut self: Self #81289
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
the mechanism for detecting and eliding : Self works by litterally checking if the pattern is self, but as param_to_string returns mut self instead of self, the comparison fails and rustdoc displays the Self type.
Activity
LeSeulArtichaut commentedon Jan 23, 2021
I'd like to investigate this :)
LeSeulArtichaut commentedon Jan 23, 2021
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
LeSeulArtichaut commentedon Jan 23, 2021
This also affects
Where
rustdocwill generate:LeSeulArtichaut commentedon Jan 23, 2021
So a few observations:
rustc_hir_pretty::param_to_stringusesprint_patwhich displays mutability in patterns, causingmutto be displayed: Selfworks by litterally checking if the pattern isself, but asparam_to_stringreturnsmut selfinstead ofself, the comparison fails andrustdocdisplays theSelftype.LeSeulArtichaut commentedon Jan 23, 2021
I see two path to solving this bug:
rustc_hir_pretty::param_to_stringto not display the mutability in patternscc @jyn514 what do you think?
jyn514 commentedon Jan 24, 2021
I would prefer to go for 1, there's no reason to have two completely different functions for pretty-printing.
camelid commentedon Feb 5, 2021
Assigning
P-mediumand removingI-prioritizeas discussed in the prioritization working group.camelid commentedon Feb 12, 2021
(now a beta regression)
Rollup merge of rust-lang#81831 - LeSeulArtichaut:81289-mut-arg, r=ca…
Rollup merge of rust-lang#81831 - LeSeulArtichaut:81289-mut-arg, r=ca…
Add regression test for rust-lang#81289