@@ -6,6 +6,7 @@ use rustc_data_structures::temp_dir::MaybeTempDir;
66use rustc_errors:: { ErrorGuaranteed , Handler } ;
77use rustc_fs_util:: fix_windows_verbatim_for_gcc;
88use rustc_hir:: def_id:: CrateNum ;
9+ use rustc_metadata:: fs:: { emit_metadata, METADATA_FILENAME } ;
910use rustc_middle:: middle:: dependency_format:: Linkage ;
1011use rustc_middle:: middle:: exported_symbols:: SymbolExportKind ;
1112use rustc_session:: config:: { self , CFGuard , CrateType , DebugInfo , LdImpl , Strip } ;
@@ -257,7 +258,7 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
257258 RlibFlavor :: Normal => {
258259 let ( metadata, metadata_position) =
259260 create_rmeta_file ( sess, codegen_results. metadata . raw_data ( ) ) ;
260- let metadata = rustc_metadata :: fs :: emit_metadata ( sess, & metadata, tmpdir) ;
261+ let metadata = emit_metadata ( sess, & metadata, tmpdir) ;
261262 match metadata_position {
262263 MetadataPosition :: First => {
263264 // Most of the time metadata in rlib files is wrapped in a "dummy" object
@@ -483,7 +484,7 @@ fn link_staticlib<'a, B: ArchiveBuilder<'a>>(
483484
484485 ab. add_archive ( path, move |fname : & str | {
485486 // Ignore metadata files, no matter the name.
486- if fname == rustc_metadata :: fs :: METADATA_FILENAME {
487+ if fname == METADATA_FILENAME {
487488 return true ;
488489 }
489490
@@ -2455,7 +2456,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
24552456
24562457 let mut archive = <B as ArchiveBuilder >:: new ( sess, & dst) ;
24572458 if let Err ( e) = archive. add_archive ( cratepath, move |f| {
2458- if f == rustc_metadata :: fs :: METADATA_FILENAME {
2459+ if f == METADATA_FILENAME {
24592460 return true ;
24602461 }
24612462
0 commit comments