diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-03-17 17:29:45 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-03-18 18:36:55 +0100 |
| commit | 458d044c5be4d86d39de894f7051bb023e2c2c40 (patch) | |
| tree | 0f3d915769b51c16d2a7df825e2263700ea6879c /compiler/rustc_metadata | |
| parent | 0ce0fedb67fa66d50aa819ef8b12f1d89eb22d7d (diff) | |
| download | rust-458d044c5be4d86d39de894f7051bb023e2c2c40.tar.gz rust-458d044c5be4d86d39de894f7051bb023e2c2c40.zip | |
Upgrade memmap to memmap2 in other crates.
Diffstat (limited to 'compiler/rustc_metadata')
| -rw-r--r-- | compiler/rustc_metadata/Cargo.toml | 2 | ||||
| -rw-r--r-- | compiler/rustc_metadata/src/locator.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_metadata/Cargo.toml b/compiler/rustc_metadata/Cargo.toml index 2aabc2c407b..48effed9274 100644 --- a/compiler/rustc_metadata/Cargo.toml +++ b/compiler/rustc_metadata/Cargo.toml @@ -11,7 +11,7 @@ doctest = false libc = "0.2" snap = "1" tracing = "0.1" -memmap = "0.7" +memmap2 = "0.2.1" smallvec = { version = "1.6.1", features = ["union", "may_dangle"] } rustc_middle = { path = "../rustc_middle" } rustc_attr = { path = "../rustc_attr" } diff --git a/compiler/rustc_metadata/src/locator.rs b/compiler/rustc_metadata/src/locator.rs index a9f58b08f58..39a39917f57 100644 --- a/compiler/rustc_metadata/src/locator.rs +++ b/compiler/rustc_metadata/src/locator.rs @@ -728,7 +728,7 @@ impl<'a> CrateLocator<'a> { } /// A trivial wrapper for `Mmap` that implements `StableDeref`. -struct StableDerefMmap(memmap::Mmap); +struct StableDerefMmap(memmap2::Mmap); impl Deref for StableDerefMmap { type Target = [u8]; @@ -779,7 +779,7 @@ fn get_metadata_section( // mmap the file, because only a small fraction of it is read. let file = std::fs::File::open(filename) .map_err(|_| format!("failed to open rmeta metadata: '{}'", filename.display()))?; - let mmap = unsafe { memmap::Mmap::map(&file) }; + let mmap = unsafe { memmap2::Mmap::map(&file) }; let mmap = mmap .map_err(|_| format!("failed to mmap rmeta metadata: '{}'", filename.display()))?; |
