File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -110,9 +110,18 @@ impl ProcOutput {
110110 fn into_bytes ( self ) -> Vec < u8 > {
111111 match self {
112112 ProcOutput :: Full { bytes, .. } => bytes,
113- ProcOutput :: Abbreviated { mut head, skipped, tail } => {
113+ ProcOutput :: Abbreviated { mut head, mut skipped, tail } => {
114+ let mut tail = & * tail;
115+
116+ // Skip over '{' at the start of the tail, so we don't later wrongfully consider this as json.
117+ // See <https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Weird.20CI.20failure/near/321797811>
118+ while tail. get ( 0 ) == Some ( & b'{' ) {
119+ tail = & tail[ 1 ..] ;
120+ skipped += 1 ;
121+ }
122+
114123 write ! ( & mut head, "\n \n <<<<<< SKIPPED {} BYTES >>>>>>\n \n " , skipped) . unwrap ( ) ;
115- head. extend_from_slice ( & tail) ;
124+ head. extend_from_slice ( tail) ;
116125 head
117126 }
118127 }
You can’t perform that action at this time.
0 commit comments