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

Some rustdoc diagnostic colors are missing #6045

Closed
ehuss opened this issue Sep 17, 2018 · 3 comments
Closed

Some rustdoc diagnostic colors are missing #6045

ehuss opened this issue Sep 17, 2018 · 3 comments

Comments

@ehuss
Copy link
Contributor

ehuss commented Sep 17, 2018

As of #5995, some error messages from rustdoc are no longer getting colored.

Example code:

/// [BadLink]
/// ```
/// \
/// ```
pub fn f() {}

The result I get on nightly:
image

The result of cargo just before #5995:
image

Notice that the warning emitted by rustdoc is still colored, but the error: unknown start of token line caused by the backslash is not! So strange!

Tested on Windows and Mac.

cc @kennytm

@alexcrichton
Copy link
Member

I believe the bug is here where the CLI --color argument isn't passed to all locations it's needed

@ehuss
Copy link
Contributor Author

ehuss commented Oct 5, 2018

I think for the particular example above is specifically related to tokenization for syntax highlighting which goes through this line: https://github.com/rust-lang/rust/blob/60c846046ec26c9e5c1216a6e118cc2e69a2956c/src/libsyntax/parse/mod.rs#L67

The test one probably seems more useful to fix, though, since tokenization errors should be rare.

@ehuss
Copy link
Contributor Author

ehuss commented Jan 31, 2019

This is now mostly fixed by rust-lang/rust#56884

@ehuss ehuss closed this as completed Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants