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

Fix rustdoc ICE in invalid_rust_codeblocks lint #102633

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

Noratrieb
Copy link
Member

@Noratrieb Noratrieb commented Oct 3, 2022

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

r? @davidtwco

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

Noratrieb commented Oct 3, 2022

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
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 4, 2022

📌 Commit 1456f73 has been approved by davidtwco

It is now in the queue for this repository.

@bors bors 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
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:master Oct 4, 2022
@rustbot rustbot 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 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
5 participants