File tree 1 file changed +10
-5
lines changed
src/cargo/core/compiler/build_runner
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -588,6 +588,12 @@ fn compute_metadata(
588
588
metas : & mut HashMap < Unit , Metadata > ,
589
589
) -> Metadata {
590
590
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
+
591
597
let mut hasher = StableHasher :: new ( ) ;
592
598
593
599
METADATA_VERSION . hash ( & mut hasher) ;
@@ -604,13 +610,12 @@ fn compute_metadata(
604
610
unit. features . hash ( & mut hasher) ;
605
611
606
612
// 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
609
614
. iter ( )
610
- . map ( |dep| metadata_of ( & dep . unit , build_runner , metas ) . meta_hash )
615
+ . map ( |m| m . meta_hash )
611
616
. collect :: < Vec < _ > > ( ) ;
612
- deps_metadata . sort ( ) ;
613
- deps_metadata . hash ( & mut hasher) ;
617
+ dep_hashes . sort ( ) ;
618
+ dep_hashes . hash ( & mut hasher) ;
614
619
615
620
// Throw in the profile we're compiling with. This helps caching
616
621
// `panic=abort` and `panic=unwind` artifacts, additionally with various
You can’t perform that action at this time.
0 commit comments