diff options
| author | bors <bors@rust-lang.org> | 2023-01-20 04:52:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-20 04:52:28 +0000 |
| commit | 56ee85274e5a3a4dda92f3bf73d1664c74ff9c15 (patch) | |
| tree | b8395fc6f6151aca9ccd2c401f763585999302a9 /src | |
| parent | 51d50ea96ecc9c681a0054e5eb8e5e1d4ab38906 (diff) | |
| parent | 65d1e8d9b556095dc50dc357e1ec4899afc3e975 (diff) | |
| download | rust-56ee85274e5a3a4dda92f3bf73d1664c74ff9c15.tar.gz rust-56ee85274e5a3a4dda92f3bf73d1664c74ff9c15.zip | |
Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstrieb
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/compiletest/src/read2.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tools/compiletest/src/read2.rs b/src/tools/compiletest/src/read2.rs index 7640e651744..a5dc6859732 100644 --- a/src/tools/compiletest/src/read2.rs +++ b/src/tools/compiletest/src/read2.rs @@ -110,9 +110,18 @@ impl ProcOutput { fn into_bytes(self) -> Vec<u8> { match self { ProcOutput::Full { bytes, .. } => bytes, - ProcOutput::Abbreviated { mut head, skipped, tail } => { + ProcOutput::Abbreviated { mut head, mut skipped, tail } => { + let mut tail = &*tail; + + // Skip over '{' at the start of the tail, so we don't later wrongfully consider this as json. + // See <https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Weird.20CI.20failure/near/321797811> + while tail.get(0) == Some(&b'{') { + tail = &tail[1..]; + skipped += 1; + } + write!(&mut head, "\n\n<<<<<< SKIPPED {} BYTES >>>>>>\n\n", skipped).unwrap(); - head.extend_from_slice(&tail); + head.extend_from_slice(tail); head } } |
