-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc generates playpen links with incorrect indentation #35483
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
Comments
Regressed sometime between 1.9.0 and 1.10.0. |
Note that #35012 has been closed without merging the change. Meanwhile Playground is showing the snippet like below now;
|
As @alexcrichton wrote on #35012, indenting Rust code without parsing would change the meaning of the code. So, can we fix the issue without parsing (or parsing Rust code for indentation is worthwhile?) |
Current status: The code that goes into playground links is generated by the same code that generates doctests, so any change to fix this issue will also affect doctests. Coincidentally enough, thanks to #54861 we run the full libsyntax parser on doctests now, so if there's a way to match items back to their place in the original string we can try to mess with the indentation that way. |
This now works correctly |
Steps to reproduce:
Playpen opens up with this code snippet:
It should instead open up with this snippet:
The text was updated successfully, but these errors were encountered: