diff options
| author | bors <bors@rust-lang.org> | 2023-03-03 16:02:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-03 16:02:37 +0000 |
| commit | 7a809ce8997a1697b166b4bb2594993e87d69f31 (patch) | |
| tree | 5510959c6bc814d01b5f71f70a733a3f48351a8d /src/tools | |
| parent | 13471d3b2046cce78181dde6cfc146c09f55e29e (diff) | |
| parent | e85df8d0fe169f8c9b25f2dfe775b62e22ccd20f (diff) | |
| download | rust-7a809ce8997a1697b166b4bb2594993e87d69f31.tar.gz rust-7a809ce8997a1697b166b4bb2594993e87d69f31.zip | |
Auto merge of #108677 - matthiaskrgr:rollup-i91cxuf, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #108022 (Support allocations with non-Box<[u8]> bytes) - #108367 (Re-apply "switch to the macos-12-xl builder") - #108557 (Point error span at Some constructor argument when trait resolution fails) - #108573 (Explain compile-time vs run-time difference in env!() error message) - #108584 (Put backtick content from rustdoc search errors into a `<code>` elements) - #108624 (Make `ExprKind` the first field in `thir::Expr`) - #108644 (Allow setting hashmap toml values in `./configure`) - #108672 (Feed queries on impl side for RPITITs when using lower_impl_trait_in_trait_to_assoc_ty) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/miri/src/machine.rs | 3 | ||||
| -rw-r--r-- | src/tools/rustdoc-js/tester.js | 14 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/tools/miri/src/machine.rs b/src/tools/miri/src/machine.rs index 8bbf9f87b43..969c81f7e32 100644 --- a/src/tools/miri/src/machine.rs +++ b/src/tools/miri/src/machine.rs @@ -777,10 +777,11 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> { type Provenance = Provenance; type ProvenanceExtra = ProvenanceExtra; + type Bytes = Box<[u8]>; type MemoryMap = MonoHashMap< AllocId, - (MemoryKind<MiriMemoryKind>, Allocation<Provenance, Self::AllocExtra>), + (MemoryKind<MiriMemoryKind>, Allocation<Provenance, Self::AllocExtra, Self::Bytes>), >; const GLOBAL_KIND: Option<MiriMemoryKind> = Some(MiriMemoryKind::Global); diff --git a/src/tools/rustdoc-js/tester.js b/src/tools/rustdoc-js/tester.js index 3da4fed33e1..ea5780f66d7 100644 --- a/src/tools/rustdoc-js/tester.js +++ b/src/tools/rustdoc-js/tester.js @@ -138,8 +138,20 @@ function valueCheck(fullPath, expected, result, error_text, queryName) { error_text.push('==> Unknown key "' + key + '"'); break; } + let result_v = result[key]; + if (result_v !== null && key === "error") { + result_v.forEach((value, index) => { + value = value.split(" ").join(" "); + if (index % 2 === 1) { + result_v[index] = "`" + value + "`"; + } else { + result_v[index] = value; + } + }); + result_v = result_v.join(""); + } const obj_path = fullPath + (fullPath.length > 0 ? '.' : '') + key; - valueCheck(obj_path, expected[key], result[key], error_text, queryName); + valueCheck(obj_path, expected[key], result_v, error_text, queryName); } } else { expectedValue = JSON.stringify(expected); |
