diff --git a/src/driver/aot.rs b/src/driver/aot.rs index 40cbc5e1a7e..32cc50eebe4 100644 --- a/src/driver/aot.rs +++ b/src/driver/aot.rs @@ -6,8 +6,8 @@ use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece}; use rustc_codegen_ssa::{CodegenResults, CompiledModule, CrateInfo, ModuleKind}; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; +use rustc_metadata::EncodedMetadata; use rustc_middle::dep_graph::{WorkProduct, WorkProductId}; -use rustc_middle::middle::cstore::EncodedMetadata; use rustc_middle::mir::mono::{CodegenUnit, MonoItem}; use rustc_session::cgu_reuse_tracker::CguReuse; use rustc_session::config::{DebugInfo, OutputType}; diff --git a/src/lib.rs b/src/lib.rs index 2ceccdd3499..beb97edf09e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,8 +30,8 @@ use rustc_codegen_ssa::traits::CodegenBackend; use rustc_codegen_ssa::CodegenResults; use rustc_errors::ErrorReported; +use rustc_metadata::EncodedMetadata; use rustc_middle::dep_graph::{WorkProduct, WorkProductId}; -use rustc_middle::middle::cstore::EncodedMetadata; use rustc_session::config::OutputFilenames; use rustc_session::Session; diff --git a/src/metadata.rs b/src/metadata.rs index 7b769dff370..1c8fd0b01d9 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -3,7 +3,7 @@ use object::write::{Object, StandardSegment, Symbol, SymbolSection}; use object::{SectionKind, SymbolFlags, SymbolKind, SymbolScope}; -use rustc_middle::middle::cstore::EncodedMetadata; +use rustc_metadata::EncodedMetadata; use rustc_middle::ty::TyCtxt; // Adapted from https://github.com/rust-lang/rust/blob/da573206f87b5510de4b0ee1a9c044127e409bd3/src/librustc_codegen_llvm/base.rs#L47-L112 @@ -16,7 +16,7 @@ pub(crate) fn new_metadata_object( use std::io::Write; let mut compressed = rustc_metadata::METADATA_HEADER.to_vec(); - FrameEncoder::new(&mut compressed).write_all(&metadata.raw_data).unwrap(); + FrameEncoder::new(&mut compressed).write_all(metadata.raw_data()).unwrap(); let triple = crate::target_triple(tcx.sess);