]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #83214 - cjgillot:dep-map, r=michaelwoerister
authorbors <bors@rust-lang.org>
Mon, 6 Sep 2021 23:58:16 +0000 (23:58 +0000)
committerbors <bors@rust-lang.org>
Mon, 6 Sep 2021 23:58:16 +0000 (23:58 +0000)
commit11bbb5231349a0a144d86d5c0c21061a06d1969d
tree70bcc7e4fddcbc40043ae83f99c9955dce8a8f55
parent1698e3cac54aa8691d4e9e207567672af8231cb6
parentbcefd487c380b113d81ac066ea9b3b4b65e9efe7
Auto merge of #83214 - cjgillot:dep-map, r=michaelwoerister

Mmap the incremental data instead of reading it.

Instead of reading the full incremental state using `fs::read_file`, we memmap it using a private read-only file-backed map.
This allows the system to reclaim any memory we are not using, while ensuring we are not polluted by
outside modifications to the file.

Suggested in https://github.com/rust-lang/rust/pull/83036#issuecomment-800458082 by `@bjorn3`
compiler/rustc_middle/src/ty/context.rs