diff options
| author | Chris Gregory <czipperz@gmail.com> | 2019-06-30 14:51:14 -0700 |
|---|---|---|
| committer | Chris Gregory <czipperz@gmail.com> | 2019-07-01 20:21:53 -0700 |
| commit | 1443abcdefc53dac3d5041d7362da3e13ae787d0 (patch) | |
| tree | fe0cf9aab1ea7287020d75c16cd938ae7b8ac0ea | |
| parent | b0c199a9697e79c70976cf4fe4fe9e0e6cc81a5c (diff) | |
| download | rust-1443abcdefc53dac3d5041d7362da3e13ae787d0.tar.gz rust-1443abcdefc53dac3d5041d7362da3e13ae787d0.zip | |
Revert change in compiletest
| -rw-r--r-- | src/tools/compiletest/src/main.rs | 1 | ||||
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 517f2a362f5..597fdf2d95e 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -1,5 +1,4 @@ #![crate_name = "compiletest"] -#![feature(mem_take)] #![feature(test)] #![feature(vec_remove_item)] #![deny(warnings, rust_2018_idioms)] diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 6053b538ff3..35caf82dd71 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -3608,7 +3608,7 @@ fn nocomment_mir_line(line: &str) -> &str { fn read2_abbreviated(mut child: Child) -> io::Result<Output> { use crate::read2::read2; - use std::mem::take; + use std::mem::replace; const HEAD_LEN: usize = 160 * 1024; const TAIL_LEN: usize = 256 * 1024; @@ -3632,7 +3632,7 @@ fn read2_abbreviated(mut child: Child) -> io::Result<Output> { return; } let tail = bytes.split_off(new_len - TAIL_LEN).into_boxed_slice(); - let head = take(bytes); + let head = replace(bytes, Vec::new()); let skipped = new_len - HEAD_LEN - TAIL_LEN; ProcOutput::Abbreviated { head, |
