Skip to content

doctest errors are no longer colored #148749

@ShE3py

Description

@ShE3py
/// ```
/// foo
/// ``` 
fn foo() {}
$ rustdoc --test lib.rs
---- lib.rs - foo (line 1) stdout ----
error[E0425]: cannot find value `foo` in this scope
 --> lib.rs:2:1
  |
3 | foo
  | ^^^ not found in this scope

error: aborting due to 1 previous error

On the +beta and +nightly channels, the stdout is no longer colored. Using --color=always fixes the issue.

Regressed in #147207 cc @Muscraft


@rustbot label +A-doctests +T-rustdoc +regression-from-stable-to-beta

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-doctestsArea: Documentation tests, run by rustdocC-bugCategory: This is a bug.I-prioritizeIssue: Indicates that prioritization has been requested for this issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions