File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
src/cargo/core/compiler/build_runner Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -588,6 +588,12 @@ fn compute_metadata(
588588 metas : & mut HashMap < Unit , Metadata > ,
589589) -> Metadata {
590590 let bcx = & build_runner. bcx ;
591+ let deps_metadata = build_runner
592+ . unit_deps ( unit)
593+ . iter ( )
594+ . map ( |dep| * metadata_of ( & dep. unit , build_runner, metas) )
595+ . collect :: < Vec < _ > > ( ) ;
596+
591597 let mut hasher = StableHasher :: new ( ) ;
592598
593599 METADATA_VERSION . hash ( & mut hasher) ;
@@ -604,13 +610,12 @@ fn compute_metadata(
604610 unit. features . hash ( & mut hasher) ;
605611
606612 // Mix in the target-metadata of all the dependencies of this target.
607- let mut deps_metadata = build_runner
608- . unit_deps ( unit)
613+ let mut dep_hashes = deps_metadata
609614 . iter ( )
610- . map ( |dep| metadata_of ( & dep . unit , build_runner , metas ) . meta_hash )
615+ . map ( |m| m . meta_hash )
611616 . collect :: < Vec < _ > > ( ) ;
612- deps_metadata . sort ( ) ;
613- deps_metadata . hash ( & mut hasher) ;
617+ dep_hashes . sort ( ) ;
618+ dep_hashes . hash ( & mut hasher) ;
614619
615620 // Throw in the profile we're compiling with. This helps caching
616621 // `panic=abort` and `panic=unwind` artifacts, additionally with various
You can’t perform that action at this time.
0 commit comments