Skip to content

rustdoc: Catch fatal errors when syntax highlighting - #68326

Merged
bors merged 1 commit into
rust-lang:masterfrom
ollie27:rustdoc_hightlight_fatal_errors
Jan 20, 2020
Merged

rustdoc: Catch fatal errors when syntax highlighting#68326
bors merged 1 commit into
rust-lang:masterfrom
ollie27:rustdoc_hightlight_fatal_errors

Conversation

@ollie27

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
Member

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

@bors: r+

@bors

bors commented Jan 19, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 79061d0 has been approved by GuillaumeGomez

@borsbors 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`.
Fixesrust-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:masterJan 20, 2020
@ollie27
ollie27 deleted the rustdoc_hightlight_fatal_errors branch January 20, 2020 10:38
@jyn514jyn514 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant 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

@ollie27@GuillaumeGomez@bors@jyn514