Skip to content

Test runner displays colors even when running in parallel, closes #9388, #782 #11689

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

Closed
wants to merge 1 commit into from
Closed

Conversation

gifnksm
Copy link
Contributor

@gifnksm gifnksm commented Jan 20, 2014

By wrapping io::stdio() with LineBufferedWriter, it is guaranteed write is called only once per lines.

I also added flush method in order to display a test <testname> ... message before the test begins to run. This message helps you to know the progress.

…, #782

By wrapping `io::stdio()` with `LineBufferedWriter`, it is guaranteed
`write` is called only once per lines.

I also added `flush` method in order to display a `test <testname> ...` message
before the test begins to run. This message helps you to know the
progress.
@alexcrichton
Copy link
Member

Sadly, this isn't the blocker for writing colors in tests. Right now if you have concurrent prints in tests (via stdio or stderr) the color delimiters will get mixed up and pollute the output even further.

We'd need to capture the child task's stdout/stderr in order to be able to safely use colors when running tests.

flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 16, 2023
…al_memcpy-when-array-length-is-equal-to-range, r=blyxyas

fix: [manual_memcpy] reduce indexing suggestions when array length is equal to loop range

fixes: rust-lang#11689

This PR improves `manual_memcpy` suggestions by reducing unnecessary indexing.

For example,
```rust
let src = [0, 1, 2, 3, 4];
let mut dest = [0; 4];
for i in 0..4 {
    dest[i] = src[i];
{
```
Clippy suggests `dest[..4].copy_from_slice(&src[..4]);`.
I reduced this suggestion as `dest.copy_from_slice(&src[..4]);`. (Removed needless indexing.)

changelog: [`manual_memcpy`]: Reduce indexing suggestions when array length is equal to loop range
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

Successfully merging this pull request may close these issues.

2 participants