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

Rustdoc shouldn't collect all attributes into a single string when parsing markdown #75669

Open
jyn514 opened this issue Aug 18, 2020 · 1 comment
Labels
A-doctests Area: Documentation tests, run by rustdoc A-markdown-parsing Area: Markdown parsing for doc-comments I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. I-compiletime Issue: Problems and improvements with respect to compile times. S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Aug 18, 2020

Unfortunately, the API seems pretty limited: https://docs.rs/pulldown-cmark/0.7.2/pulldown_cmark/struct.Parser.html

So until it's being extended, I guess we're kinda stuck with this extra allocation...

Originally posted by @GuillaumeGomez in #75665

@jyn514 jyn514 added A-doctests Area: Documentation tests, run by rustdoc S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. I-compiletime Issue: Problems and improvements with respect to compile times. labels Aug 18, 2020
@GuillaumeGomez
Copy link
Member

To be checked but I *think* we could extend their API to allow them to take an iterator over char or something along the line.

@jyn514 jyn514 added the A-markdown-parsing Area: Markdown parsing for doc-comments label Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-doctests Area: Documentation tests, run by rustdoc A-markdown-parsing Area: Markdown parsing for doc-comments I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. I-compiletime Issue: Problems and improvements with respect to compile times. S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
Status: No status
Development

No branches or pull requests

3 participants