Revert change in compiletest

This commit is contained in:
Chris Gregory 2019-06-30 14:51:14 -07:00
parent b0c199a969
commit 1443abcdef
2 changed files with 2 additions and 3 deletions

View file

@ -1,5 +1,4 @@
#![crate_name = "compiletest"]
#![feature(mem_take)]
#![feature(test)]
#![feature(vec_remove_item)]
#![deny(warnings, rust_2018_idioms)]

View file

@ -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,