File tree 2 files changed +2
-3
lines changed
src/tools/compiletest/src
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 1
1
#![ crate_name = "compiletest" ]
2
- #![ feature( mem_take) ]
3
2
#![ feature( test) ]
4
3
#![ feature( vec_remove_item) ]
5
4
#![ deny( warnings, rust_2018_idioms) ]
Original file line number Diff line number Diff line change @@ -3608,7 +3608,7 @@ fn nocomment_mir_line(line: &str) -> &str {
3608
3608
3609
3609
fn read2_abbreviated ( mut child : Child ) -> io:: Result < Output > {
3610
3610
use crate :: read2:: read2;
3611
- use std:: mem:: take ;
3611
+ use std:: mem:: replace ;
3612
3612
3613
3613
const HEAD_LEN : usize = 160 * 1024 ;
3614
3614
const TAIL_LEN : usize = 256 * 1024 ;
@@ -3632,7 +3632,7 @@ fn read2_abbreviated(mut child: Child) -> io::Result<Output> {
3632
3632
return ;
3633
3633
}
3634
3634
let tail = bytes. split_off ( new_len - TAIL_LEN ) . into_boxed_slice ( ) ;
3635
- let head = take ( bytes) ;
3635
+ let head = replace ( bytes, Vec :: new ( ) ) ;
3636
3636
let skipped = new_len - HEAD_LEN - TAIL_LEN ;
3637
3637
ProcOutput :: Abbreviated {
3638
3638
head,
You can’t perform that action at this time.
0 commit comments