summaryrefslogtreecommitdiff
path: root/compiler/rustc_session/src/cstore.rs
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2023-05-17 11:13:55 +0530
committerGitHub <noreply@github.com>2023-05-17 11:13:55 +0530
commit2a5c4baf68ef935be5948c86934aa7519e663704 (patch)
tree81deb1ae7bfcef9d7bf79bb5c0ba419b45a81687 /compiler/rustc_session/src/cstore.rs
parentc0784db3deddfb09f52c65373ef50b14d82494cc (diff)
parenta6197a5dcad33acd67a8455196b8dbaab525e3f9 (diff)
downloadrust-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_session/src/cstore.rs')
-rw-r--r--compiler/rustc_session/src/cstore.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_session/src/cstore.rs b/compiler/rustc_session/src/cstore.rs
index 8089d81cc22..dc475e8c6d5 100644
--- a/compiler/rustc_session/src/cstore.rs
+++ b/compiler/rustc_session/src/cstore.rs
@@ -6,7 +6,8 @@ use crate::search_paths::PathKind;
use crate::utils::NativeLibKind;
use crate::Session;
use rustc_ast as ast;
-use rustc_data_structures::sync::{self, AppendOnlyIndexVec, MetadataRef, RwLock};
+use rustc_data_structures::owned_slice::OwnedSlice;
+use rustc_data_structures::sync::{self, AppendOnlyIndexVec, RwLock};
use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, StableCrateId, LOCAL_CRATE};
use rustc_hir::definitions::{DefKey, DefPath, DefPathHash, Definitions};
use rustc_span::hygiene::{ExpnHash, ExpnId};
@@ -203,8 +204,8 @@ pub enum ExternCrateSource {
/// metadata in library -- this trait just serves to decouple rustc_metadata from
/// the archive reader, which depends on LLVM.
pub trait MetadataLoader: std::fmt::Debug {
- fn get_rlib_metadata(&self, target: &Target, filename: &Path) -> Result<MetadataRef, String>;
- fn get_dylib_metadata(&self, target: &Target, filename: &Path) -> Result<MetadataRef, String>;
+ fn get_rlib_metadata(&self, target: &Target, filename: &Path) -> Result<OwnedSlice, String>;
+ fn get_dylib_metadata(&self, target: &Target, filename: &Path) -> Result<OwnedSlice, String>;
}
pub type MetadataLoaderDyn = dyn MetadataLoader + Send + Sync + sync::DynSend + sync::DynSync;