Open
Description
Split from #67563.
Currently, the bad_codeblock_syntax_pass in rustdoc provides error messages like the following:
warning: could not parse code block as Rust code
--> $DIR/invalid-syntax.rs:3:5
|
LL | /// ```
| _____^
LL | | /// \__________pkt->size___________/ \_result->size_/ \__pkt->size__/
LL | | /// ```
| |_______^
|
= note: error from rustc: unknown start of token: \
= note: error from rustc: unknown start of token: \
= note: error from rustc: unknown start of token: \
Ideally, we could display the error spans inline (but downgrade them to warnings).
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
jyn514 commentedon Dec 15, 2020
Triage: the errors are still the same on 1.50 nightly.
INVALID_RUST_CODEBLOCKS
) #84587jyn514 commentedon May 4, 2021
I tried this change:
Unfortunately it doesn't work very well; I think the spans don't match up between sessions.
jyn514 commentedon May 4, 2021
This also doesn't work well:
camelid commentedon May 5, 2021
That's just because you need to offset the span by the position of the start of the codeblock (the
```
).