Description
When building documentation on bindgen-produced Rust files, a possible sight looks like this:
error: unknown start of token: \ --> <stdin>:8:1 | 8 | \__________pkt->size___________/ \_result->size_/ \__pkt->size__/ | ^ warning: Backing out of syntax highlighting | = note: You probably did not intend to render this as a rust code-block
(Apparently github swallows the output color codes, but envision error in alerting red and warning in yellow).
To the moderately experienced developer, this screams "The build did not succeed", and they might even go as far as to look at how to make rust-bindgen produce more readable comments -- where actually, everything is fine and this is just a warning.
It appears to me that the error output of the highlighter is passed on to stderr. I suggest that the error be visually styled in a way that it can not be mistaken for a fatal error in the build process itself, eg. by replacing the red "error" text with a yellow "syntax highlighter error (caught)", and/or by indenting the output of the syntax highlighter.
I'd be happy to contribute code but failed to find the component that issues the "Backing out of syntax highlighting" messages; pointers would be appreciated.
Meta
- cargo 1.29.0-nightly (0ec7281b9 2018-08-20)