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: Catch fatal errors when syntax highlighting #68326

Merged
merged 1 commit into from
Jan 20, 2020

Conversation

ollie27
Copy link
Member

@ollie27 ollie27 commented Jan 17, 2020

For some errors the lexer will unwind so we need to handle that in addition to handling token::Unknown.

Fixes #56885

r? @GuillaumeGomez

For some errors the lexer will unwind so we need to handle that in addition to handling `token::Unknown`.
@GuillaumeGomez
Copy link
Member

The "simpler" solution in here I arrived to was to simply update the pulldown-cmark version. However we're still waiting for the new release since that when I updated to the current one, I discovered some bugs.

What do you think? If you still prefer to go on with this PR, please at least add a TODO or equivalent in the code and open an issue so we can remove this catch.

@ollie27
Copy link
Member Author

ollie27 commented Jan 19, 2020

The "simpler" solution in here I arrived to was to simply update the pulldown-cmark version.

I think you're thinking of a different issue. The syntax highlighting has nothing to do with pulldown-cmark. The unwinding here is coming from rustc's lexer and according to #63288 it's intentional, at least for now.

@GuillaumeGomez
Copy link
Member

My bad! Then looks all good to me, thanks!

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 19, 2020

📌 Commit 79061d0 has been approved by GuillaumeGomez

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 19, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Jan 20, 2020
…rors, r=GuillaumeGomez

rustdoc: Catch fatal errors when syntax highlighting

For some errors the lexer will unwind so we need to handle that in addition to handling `token::Unknown`.

Fixes rust-lang#56885

r? @GuillaumeGomez
bors added a commit that referenced this pull request Jan 20, 2020
Rollup of 5 pull requests

Successful merges:

 - #68326 (rustdoc: Catch fatal errors when syntax highlighting)
 - #68335 (Remove real_drop_in_place)
 - #68353 (Remove `rustc_error_codes` deps except in `rustc_driver`)
 - #68357 (rustdoc: Fix handling of compile errors when running `rustdoc --test`)
 - #68365 (Clean up error codes)

Failed merges:

r? @ghost
@bors bors merged commit 79061d0 into rust-lang:master Jan 20, 2020
@ollie27 ollie27 deleted the rustdoc_hightlight_fatal_errors branch January 20, 2020 10:38
@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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: some fatal lexing errors are not buffered
4 participants