File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -806,7 +806,7 @@ impl<'a> CrateLoader<'a> {
806806 }
807807
808808 info ! ( "injecting a dep from {} to {}" , cnum, krate) ;
809- data. dependencies . borrow_mut ( ) . push ( krate) ;
809+ data. push_dependency ( krate) ;
810810 } ) ;
811811 }
812812
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ crate struct CrateMetadata {
9595 /// IDs as they are seen from the current compilation session.
9696 crate cnum_map : CrateNumMap ,
9797 /// Same ID set as `cnum_map` plus maybe some injected crates like panic runtime.
98- crate dependencies : Lock < Vec < CrateNum > > ,
98+ dependencies : Lock < Vec < CrateNum > > ,
9999 /// How to link (or not link) this crate to the currently compiled crate.
100100 dep_kind : Lock < DepKind > ,
101101 /// Filesystem location of this crate.
@@ -1134,6 +1134,10 @@ impl<'a, 'tcx> CrateMetadata {
11341134
11351135 dep_node_index
11361136 }
1137+
1138+ crate fn push_dependency ( & self , krate : CrateNum ) {
1139+ self . dependencies . borrow_mut ( ) . push ( krate) ;
1140+ }
11371141}
11381142
11391143// Cannot be implemented on 'ProcMacro', as libproc_macro
You can’t perform that action at this time.
0 commit comments