Skip to content

Commit

Permalink
Revert change in compiletest
Browse files Browse the repository at this point in the history
  • Loading branch information
czipperz committed Jul 2, 2019
1 parent b0c199a commit 1443abc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion 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)]
Expand Down
4 changes: 2 additions & 2 deletions src/tools/compiletest/src/runtest.rs
Expand Up @@ -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;
Expand All @@ -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,
Expand Down

0 comments on commit 1443abc

Please sign in to comment.