diff options
author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-05-17 11:13:55 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 11:13:55 +0530 |
commit | 2a5c4baf68ef935be5948c86934aa7519e663704 (patch) | |
tree | 81deb1ae7bfcef9d7bf79bb5c0ba419b45a81687 /compiler/rustc_metadata/src/locator.rs | |
parent | c0784db3deddfb09f52c65373ef50b14d82494cc (diff) | |
parent | a6197a5dcad33acd67a8455196b8dbaab525e3f9 (diff) | |
download | rust-2a5c4baf68ef935be5948c86934aa7519e663704.tar.gz |
Rollup merge of #110145 - WaffleLapkin:share_slice_of_bytes, r=Nilstrieb
Share slice of bytes
r? `@Nilstrieb`
cc `@noamtashma`
Diffstat (limited to 'compiler/rustc_metadata/src/locator.rs')
-rw-r--r-- | compiler/rustc_metadata/src/locator.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_metadata/src/locator.rs b/compiler/rustc_metadata/src/locator.rs index c6af8d63289..6c4d121fd01 100644 --- a/compiler/rustc_metadata/src/locator.rs +++ b/compiler/rustc_metadata/src/locator.rs @@ -220,7 +220,6 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::memmap::Mmap; use rustc_data_structures::owned_slice::slice_owned; use rustc_data_structures::svh::Svh; -use rustc_data_structures::sync::MetadataRef; use rustc_errors::{DiagnosticArgValue, FatalError, IntoDiagnosticArg}; use rustc_fs_util::try_canonicalize; use rustc_session::config::{self, CrateType}; @@ -782,7 +781,7 @@ fn get_metadata_section<'p>( if !filename.exists() { return Err(MetadataError::NotPresent(filename)); } - let raw_bytes: MetadataRef = match flavor { + let raw_bytes = match flavor { CrateFlavor::Rlib => { loader.get_rlib_metadata(target, filename).map_err(MetadataError::LoadFailure)? } @@ -843,7 +842,7 @@ fn get_metadata_section<'p>( slice_owned(mmap, Deref::deref) } }; - let blob = MetadataBlob::new(raw_bytes); + let blob = MetadataBlob(raw_bytes); if blob.is_compatible() { Ok(blob) } else { |