@@ -7,7 +7,6 @@ use rustc_ast::{self as ast, visit};
7
7
use rustc_codegen_ssa:: back:: link:: emit_metadata;
8
8
use rustc_codegen_ssa:: traits:: CodegenBackend ;
9
9
use rustc_data_structures:: parallel;
10
- use rustc_data_structures:: steal:: Steal ;
11
10
use rustc_data_structures:: sync:: { par_iter, Lrc , OnceCell , ParallelIterator , WorkerLocal } ;
12
11
use rustc_data_structures:: temp_dir:: MaybeTempDir ;
13
12
use rustc_errors:: { ErrorReported , PResult } ;
@@ -346,7 +345,7 @@ fn pre_expansion_lint(
346
345
347
346
fn configure_and_expand_inner < ' a > (
348
347
sess : & ' a Session ,
349
- lint_store : & ' a LintStore ,
348
+ lint_store : & LintStore ,
350
349
mut krate : ast:: Crate ,
351
350
crate_name : & str ,
352
351
resolver_arenas : & ' a ResolverArenas < ' a > ,
@@ -669,7 +668,7 @@ fn escape_dep_env(symbol: Symbol) -> String {
669
668
670
669
fn write_out_deps (
671
670
sess : & Session ,
672
- boxed_resolver : & Steal < Rc < RefCell < BoxedResolver > > > ,
671
+ resolver : & Resolver < ' _ > ,
673
672
outputs : & OutputFilenames ,
674
673
out_filenames : & [ PathBuf ] ,
675
674
) {
@@ -696,20 +695,18 @@ fn write_out_deps(
696
695
}
697
696
698
697
if sess. binary_dep_depinfo ( ) {
699
- boxed_resolver. borrow ( ) . borrow_mut ( ) . access ( |resolver| {
700
- for cnum in resolver. cstore ( ) . crates_untracked ( ) {
701
- let source = resolver. cstore ( ) . crate_source_untracked ( cnum) ;
702
- if let Some ( ( path, _) ) = source. dylib {
703
- files. push ( escape_dep_filename ( & path. display ( ) . to_string ( ) ) ) ;
704
- }
705
- if let Some ( ( path, _) ) = source. rlib {
706
- files. push ( escape_dep_filename ( & path. display ( ) . to_string ( ) ) ) ;
707
- }
708
- if let Some ( ( path, _) ) = source. rmeta {
709
- files. push ( escape_dep_filename ( & path. display ( ) . to_string ( ) ) ) ;
710
- }
698
+ for cnum in resolver. cstore ( ) . crates_untracked ( ) {
699
+ let source = resolver. cstore ( ) . crate_source_untracked ( cnum) ;
700
+ if let Some ( ( path, _) ) = source. dylib {
701
+ files. push ( escape_dep_filename ( & path. display ( ) . to_string ( ) ) ) ;
711
702
}
712
- } ) ;
703
+ if let Some ( ( path, _) ) = source. rlib {
704
+ files. push ( escape_dep_filename ( & path. display ( ) . to_string ( ) ) ) ;
705
+ }
706
+ if let Some ( ( path, _) ) = source. rmeta {
707
+ files. push ( escape_dep_filename ( & path. display ( ) . to_string ( ) ) ) ;
708
+ }
709
+ }
713
710
}
714
711
715
712
let mut file = BufWriter :: new ( fs:: File :: create ( & deps_filename) ?) ;
@@ -765,7 +762,7 @@ pub fn prepare_outputs(
765
762
sess : & Session ,
766
763
compiler : & Compiler ,
767
764
krate : & ast:: Crate ,
768
- boxed_resolver : & Steal < Rc < RefCell < BoxedResolver > > > ,
765
+ resolver : & Resolver < ' _ > ,
769
766
crate_name : & str ,
770
767
) -> Result < OutputFilenames > {
771
768
let _timer = sess. timer ( "prepare_outputs" ) ;
@@ -805,7 +802,7 @@ pub fn prepare_outputs(
805
802
}
806
803
}
807
804
808
- write_out_deps ( sess, boxed_resolver , & outputs, & output_paths) ;
805
+ write_out_deps ( sess, resolver , & outputs, & output_paths) ;
809
806
810
807
let only_dep_info = sess. opts . output_types . contains_key ( & OutputType :: DepInfo )
811
808
&& sess. opts . output_types . len ( ) == 1 ;
0 commit comments