Skip to content

Commit 63785c8

Browse files
Add comment explaining why we can't split on error[{}]: because of the color escape characters
1 parent 95ee1fc commit 63785c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustdoc/doctest.rs

+3
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ fn run_test(
336336
(true, false) => {}
337337
(false, true) => {
338338
if !error_codes.is_empty() {
339+
// We used to check if the output contained "error[{}]: " but since we added the
340+
// colored output, we can't anymore because of the color escape characters before
341+
// the ":".
339342
error_codes.retain(|err| !out.contains(&format!("error[{}]", err)));
340343

341344
if !error_codes.is_empty() {

0 commit comments

Comments
 (0)