rust/compiler/rustc_data_structures/src
bors 1ba1fec234 Auto merge of #96544 - m-ysk:feature/issue-96358, r=cjgillot
Stop keeping metadata in memory before writing it to disk

Fixes #96358

I created this PR according with the instruction given in the issue except for the following points:

- While the issue says "Write metadata into the temporary file in `encode_and_write_metadata` even if `!need_metadata_file`", I could not do that. That is because though I tried to do that and run `x.py test`, I got a lot of test failures as follows.

<details>
<summary>List of failed tests</summary>
<pre>
<code>
failures:
    [ui] src/test/ui/json-multiple.rs
    [ui] src/test/ui/json-options.rs
    [ui] src/test/ui/rmeta/rmeta-rpass.rs
    [ui] src/test/ui/save-analysis/emit-notifications.rs
    [ui] src/test/ui/svh/changing-crates.rs
    [ui] src/test/ui/svh/svh-change-lit.rs
    [ui] src/test/ui/svh/svh-change-significant-cfg.rs
    [ui] src/test/ui/svh/svh-change-trait-bound.rs
    [ui] src/test/ui/svh/svh-change-type-arg.rs
    [ui] src/test/ui/svh/svh-change-type-ret.rs
    [ui] src/test/ui/svh/svh-change-type-static.rs
    [ui] src/test/ui/svh/svh-use-trait.rs

test result: FAILED. 12915 passed; 12 failed; 100 ignored; 0 measured; 0 filtered out; finished in 71.41s

Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
Build completed unsuccessfully in 0:01:58
</code>
</pre>
</details>

- I could not resolve the extra tasks about `create_rmeta_file` and `create_compressed_metadata_file` for my lack of ability.
2022-07-14 21:50:14 +00:00
..
base_n Adapt rustc_data_structures tests to run in strict miri 2022-06-04 17:46:29 +02:00
binary_search_util Adopt let else in more places 2022-02-19 17:27:43 +01:00
fingerprint Make Fingerprint::combine_commutative associative 2022-01-03 19:07:29 +01:00
flock separate flock implementations into separate modules 2022-04-14 18:30:53 -04:00
graph Adapt rustc_data_structures tests to run in strict miri 2022-06-04 17:46:29 +02:00
intern Rename PtrKey as Interned and improve it. 2022-02-15 15:50:29 +11:00
obligation_forest Split process_obligation in two. 2022-06-06 08:47:49 +10:00
owning_ref Adapt rustc_data_structures tests to run in strict miri 2022-06-04 17:46:29 +02:00
sip128 SipHasher128: improve constant names and add more comments 2020-10-11 23:48:35 -07:00
small_c_str
small_str Add SmallStr 2022-03-04 16:57:34 +01:00
snapshot_map Call the method fork instead of clone and add proper comments 2022-02-14 12:57:20 -03:00
sorted_map Remove invalid #[cfg(tests)] in index_map 2022-03-04 11:34:50 +01:00
sso Tweak insert docs 2022-05-31 22:08:14 -07:00
stable_hasher Fix isize optimization in StableHasher for big-endian architectures 2022-02-03 11:47:41 +01:00
tagged_ptr Small performance tweaks 2021-12-12 12:35:01 +08:00
thin_vec eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
tiny_list Move some test-only code to test files 2021-03-17 10:31:30 -04:00
transitive_relation Spellchecking some comments 2022-03-30 01:39:38 -04:00
vec_map eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
atomic_ref.rs
base_n.rs Apply clippy suggestions 2021-10-10 15:38:19 +02:00
captures.rs Remove #[allow(unused_lifetimes)] which is now unnecessary 2021-06-17 08:56:54 +09:00
fingerprint.rs Rename rustc_serialize::opaque::Encoder as MemEncoder. 2022-06-14 14:52:01 +10:00
flock.rs separate flock implementations into separate modules 2022-04-14 18:30:53 -04:00
frozen.rs fix most compiler/ doctests 2022-05-02 17:40:30 -07:00
functor.rs Make IdFunctor::try_map_id panic-safe 2021-12-07 11:11:23 +00:00
fx.rs
intern.rs Document and rename the new wrapper type 2022-04-07 13:01:48 +00:00
jobserver.rs Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
lib.rs Allow to create definitions inside the query system. 2022-07-06 22:50:55 +02:00
macros.rs Introduce ChunkedBitSet and use it for some dataflow analyses. 2022-02-23 10:18:49 +11:00
map_in_place.rs Add debug assertions to some unsafe functions 2022-03-29 11:05:24 -04:00
memmap.rs define MmapMut and use it in Decodable impl 2022-07-02 22:54:37 +09:00
profiling.rs Fixed RSS reporting on macOS 2022-06-22 15:24:54 +03:00
sharded.rs Move Sharded maps into each QueryCache impl 2022-02-20 12:10:46 -05:00
sip128.rs Fix stacked borrows invalidation in rustc_data_structures sip128 2022-06-04 17:46:36 +02:00
small_c_str.rs Inline SmallCStr::deref 2022-03-04 16:57:34 +01:00
small_str.rs Add SmallStr 2022-03-04 16:57:34 +01:00
sorted_map.rs Use SortedMap in HIR. 2021-10-21 23:08:57 +02:00
stable_hasher.rs Fix typos in comment 2022-05-30 21:21:32 +02:00
stable_map.rs
stable_set.rs
stack.rs Allow inlining of ensure_sufficient_stack() 2022-02-12 11:30:04 +01:00
steal.rs more clippy fixes 2021-11-07 16:59:05 +01:00
svh.rs Use delayed error handling for Encodable and Encoder infallible. 2022-06-08 07:01:26 +10:00
sync.rs Allow to create definitions inside the query system. 2022-07-06 22:50:55 +02:00
tagged_ptr.rs fix most compiler/ doctests 2022-05-02 17:40:30 -07:00
temp_dir.rs Capitalize safety comments 2020-09-08 22:37:18 -04:00
thin_vec.rs Rustdoc: use ThinVec for GenericArgs bindings 2022-01-01 11:29:14 +01:00
tiny_list.rs Apply clippy suggestions 2021-10-10 15:38:19 +02:00
transitive_relation.rs fix most compiler/ doctests 2022-05-02 17:40:30 -07:00
unhash.rs Avoid rehashing Fingerprint as a map key 2020-09-01 18:27:02 -07:00
vec_linked_list.rs Stop enabling in_band_lifetimes in rustc_data_structures 2021-12-05 20:17:35 -08:00
vec_map.rs Fix some fallout around type alias impl trait in associated types 2022-04-06 12:56:22 +00:00
work_queue.rs Remove (lots of) dead code 2021-03-27 22:16:33 -04:00