@@ -36,11 +36,11 @@ use rustc::session::config::nightly_options;
3636use rustc:: session:: { early_error, early_warn} ;
3737use rustc:: lint:: Lint ;
3838use rustc:: lint;
39+ use rustc:: middle:: cstore:: MetadataLoader ;
3940use rustc:: hir:: def_id:: LOCAL_CRATE ;
4041use rustc:: ty:: TyCtxt ;
4142use rustc:: util:: common:: { set_time_depth, time, print_time_passes_entry, ErrorReported } ;
4243use rustc_metadata:: locator;
43- use rustc_metadata:: cstore:: CStore ;
4444use rustc_codegen_utils:: codegen_backend:: CodegenBackend ;
4545use rustc_interface:: interface;
4646use rustc_interface:: util:: get_codegen_sysroot;
@@ -277,7 +277,7 @@ pub fn run_compiler(
277277 compiler. output_file ( ) ,
278278 ) . and_then ( || RustcDefaultCalls :: list_metadata (
279279 sess,
280- compiler. cstore ( ) ,
280+ & * compiler. codegen_backend ( ) . metadata_loader ( ) ,
281281 & matches,
282282 compiler. input ( )
283283 ) ) ;
@@ -614,7 +614,7 @@ fn show_content_with_pager(content: &String) {
614614
615615impl RustcDefaultCalls {
616616 pub fn list_metadata ( sess : & Session ,
617- cstore : & CStore ,
617+ metadata_loader : & dyn MetadataLoader ,
618618 matches : & getopts:: Matches ,
619619 input : & Input )
620620 -> Compilation {
@@ -626,7 +626,7 @@ impl RustcDefaultCalls {
626626 let mut v = Vec :: new ( ) ;
627627 locator:: list_file_metadata ( & sess. target . target ,
628628 path,
629- cstore ,
629+ metadata_loader ,
630630 & mut v)
631631 . unwrap ( ) ;
632632 println ! ( "{}" , String :: from_utf8( v) . unwrap( ) ) ;
0 commit comments