Skip to content

Fix rustdoc ICE in invalid_rust_codeblocks lint - #102633

Merged
bors merged 1 commit into
rust-lang:masterfrom
Noratrieb:rustdoc-lint-🏳️‍⚧️late
Oct 4, 2022

Hidden character warning

The head ref may contain hidden characters: "rustdoc-lint-\ud83c\udff3\ufe0f\u200d\u26a7\ufe0flate"
Merged

Fix rustdoc ICE in invalid_rust_codeblocks lint#102633
bors merged 1 commit into
rust-lang:masterfrom
Noratrieb:rustdoc-lint-🏳️‍⚧️late

Conversation

@Noratrieb

@NoratriebNoratrieb commented Oct 3, 2022

Copy link
Copy Markdown
Member

The diagnostic message extraction code didn't handle translations yet.
Fixes#102603
Fixes#102631

r? @davidtwco

@rustbotrustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 3, 2022
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 3, 2022
@Noratrieb

Noratrieb commented Oct 3, 2022

Copy link
Copy Markdown
MemberAuthor

I have not found a way to test this yet, the invalid_rust_codeblocks lint very confusing and sometimes just swallows clearly invalid rust syntax? I'm putting it up already anyways as I have locally verified that it does fix the ICE.

Ah, this lint only fires for rust code that fails to tokenize, not parse. And getting this to ICE is hard because the lexer errors aren't using session diagnostics yet. I wonder where that nom issue is coming from..

Ah, mismatched parentheses don't error in rustc_lexer but in rustc_parse, which is translated. Great, I have a test now.

The diagnostic message extraction code didn't handle translations yet.
@davidtwco

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Oct 4, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 1456f73 has been approved by davidtwco

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 4, 2022
@Dylan-DPCDylan-DPC mentioned this pull request Oct 4, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 4, 2022
Rollup of 6 pull requests
Successful merges:
- rust-lang#101189 (Implement `Ready::into_inner()`)
- rust-lang#101642 (Fix in-place collection leak when remaining element destructor panic)
- rust-lang#102489 (Normalize substs before resolving instance in `NoopMethodCall` lint)
- rust-lang#102559 (Don't ICE when trying to copy unsized value in const prop)
- rust-lang#102568 (Lint against nested opaque types that don't satisfy associated type bounds)
- rust-lang#102633 (Fix rustdoc ICE in invalid_rust_codeblocks lint)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit f7ca465 into rust-lang:masterOct 4, 2022
@rustbotrustbot added this to the 1.66.0 milestone Oct 4, 2022
@Noratrieb
Noratrieb deleted the rustdoc-lint-🏳️‍⚧️late branch October 4, 2022 16:38
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

5 participants

@Noratrieb@davidtwco@bors@rust-highfive@rustbot