Uh oh!
There was an error while loading. Please reload this page.
Move doc comment parsing to rustc_lexer - #75642
Conversation
matklad
commented
Aug 17, 2020
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
petrochenkov
commented
Aug 18, 2020
r=me with nits addressed. |
I've addressed nits except for qualified paths. I think, in this case, qualified paths would be better. We have parallel hierarchies of types here: So, it seems better if we stick to not qualifying |
petrochenkov
commented
Aug 19, 2020
This looks pretty bad. |
petrochenkov
commented
Aug 19, 2020
Block vs Line looks like a "heavier" candidate for The other can be Also |
Plain comments are trivial, while doc comments are not, so it feels like this belongs to the rustc_lexer. The specific reason to do this is the desire to use rustc_lexer in rustdoc for syntax highlighting, without duplicating "is this a doc comment?" logic there.
Outer `if` is the fast path -- it calls into hyperoptimized memchr. The inner loop is just the simplest code possible -- it doesn't generated the tightest code, but that shouldn't matter if we are going to error anyhow.
matklad
commented
Aug 19, 2020
How this version look? I've get rid of |
petrochenkov
commented
Aug 19, 2020
LGTM. |
bors
commented
Aug 19, 2020
📌 Commit ccbe94b has been approved by |
bors
commented
Aug 21, 2020
bors
commented
Aug 21, 2020
☀️ Test successful - checks-actions, checks-azure |
Plain comments are trivia, while doc comments are not, so it feels
like this belongs to the rustc_lexer.
The specific reason to do this is the desire to use rustc_lexer in
rustdoc for syntax highlighting, without duplicating "is this a doc
comment?" logic there.
r? @ghost