Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reset the terminal color before the newline for diagnostics
When printing colored diagnostics, we need to reset the terminal before emitting the newline, not after. Otherwise it gets line-buffered and the color won't reset until the next line is printed or the compiler exits. Normally this isn't a problem, but when running rustc in parallel with other processes (e.g. `make -j4`) this can cause the color to leak to other lines.
- Loading branch information
b991bbe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at lilyball@b991bbe
b991bbe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging kballard/rust/diagnostic_color_newline = b991bbe into auto
b991bbe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kballard/rust/diagnostic_color_newline = b991bbe merged ok, testing candidate = 6291955
b991bbe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/5857
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/5855
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/4951
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/4959
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/5954
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/5043
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/5051
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/5957
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/5042
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/5048
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/5110
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2843
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/5950
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/5046
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/5061
b991bbe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 6291955