@@ -6,6 +6,7 @@ use rustc_data_structures::temp_dir::MaybeTempDir;
6
6
use rustc_errors:: { ErrorGuaranteed , Handler } ;
7
7
use rustc_fs_util:: fix_windows_verbatim_for_gcc;
8
8
use rustc_hir:: def_id:: CrateNum ;
9
+ use rustc_metadata:: fs:: { emit_metadata, METADATA_FILENAME } ;
9
10
use rustc_middle:: middle:: dependency_format:: Linkage ;
10
11
use rustc_middle:: middle:: exported_symbols:: SymbolExportKind ;
11
12
use rustc_session:: config:: { self , CFGuard , CrateType , DebugInfo , LdImpl , Strip } ;
@@ -257,7 +258,7 @@ fn link_rlib<'a, B: ArchiveBuilder<'a>>(
257
258
RlibFlavor :: Normal => {
258
259
let ( metadata, metadata_position) =
259
260
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) ;
261
262
match metadata_position {
262
263
MetadataPosition :: First => {
263
264
// 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>>(
483
484
484
485
ab. add_archive ( path, move |fname : & str | {
485
486
// Ignore metadata files, no matter the name.
486
- if fname == rustc_metadata :: fs :: METADATA_FILENAME {
487
+ if fname == METADATA_FILENAME {
487
488
return true ;
488
489
}
489
490
@@ -2455,7 +2456,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
2455
2456
2456
2457
let mut archive = <B as ArchiveBuilder >:: new ( sess, & dst) ;
2457
2458
if let Err ( e) = archive. add_archive ( cratepath, move |f| {
2458
- if f == rustc_metadata :: fs :: METADATA_FILENAME {
2459
+ if f == METADATA_FILENAME {
2459
2460
return true ;
2460
2461
}
2461
2462
0 commit comments