@@ -71,10 +71,10 @@ use super::job::{
7171} ;
7272use super :: timings:: Timings ;
7373use super :: { BuildContext , BuildPlan , CompileMode , Context , Unit } ;
74- use crate :: core:: compiler:: fingerprint:: DirtyReason ;
7574use crate :: core:: compiler:: future_incompat:: {
7675 self , FutureBreakageItem , FutureIncompatReportPackage ,
7776} ;
77+ use crate :: core:: compiler:: job:: FreshnessKind ;
7878use crate :: core:: resolver:: ResolveBehavior ;
7979use crate :: core:: { PackageId , Shell , TargetKind } ;
8080use crate :: util:: diagnostic_server:: { self , DiagnosticPrinter } ;
@@ -676,7 +676,7 @@ impl<'cfg> DrainState<'cfg> {
676676 // NOTE: An error here will drop the job without starting it.
677677 // That should be OK, since we want to exit as soon as
678678 // possible during an error.
679- self . note_working_on ( cx. bcx . config , & unit, job. freshness ( ) , job . dirty_reason ( ) ) ?;
679+ self . note_working_on ( cx. bcx . config , & unit, job. freshness ( ) ) ?;
680680 }
681681 self . run ( & unit, job, cx, scope) ;
682682 }
@@ -1115,7 +1115,7 @@ impl<'cfg> DrainState<'cfg> {
11151115 assert ! ( self . active. insert( id, unit. clone( ) ) . is_none( ) ) ;
11161116
11171117 let messages = self . messages . clone ( ) ;
1118- let fresh = job. freshness ( ) ;
1118+ let fresh = job. freshness ( ) . kind ( ) ; // closure below moves job, cannot keep `&Freshness`
11191119 let rmeta_required = cx. rmeta_required ( unit) ;
11201120
11211121 let doit = move |state : JobState < ' _ , ' _ > | {
@@ -1167,7 +1167,7 @@ impl<'cfg> DrainState<'cfg> {
11671167 } ;
11681168
11691169 match fresh {
1170- Freshness :: Fresh => {
1170+ FreshnessKind :: Fresh => {
11711171 self . timings . add_fresh ( ) ;
11721172 // Running a fresh job on the same thread is often much faster than spawning a new
11731173 // thread to run the job.
@@ -1179,7 +1179,7 @@ impl<'cfg> DrainState<'cfg> {
11791179 _marker : marker:: PhantomData ,
11801180 } ) ;
11811181 }
1182- Freshness :: Dirty => {
1182+ FreshnessKind :: Dirty => {
11831183 self . timings . add_dirty ( ) ;
11841184 scope. spawn ( move || {
11851185 doit ( JobState {
@@ -1342,8 +1342,7 @@ impl<'cfg> DrainState<'cfg> {
13421342 & mut self ,
13431343 config : & Config ,
13441344 unit : & Unit ,
1345- fresh : Freshness ,
1346- dirty_reason : Option < & DirtyReason > ,
1345+ fresh : & Freshness ,
13471346 ) -> CargoResult < ( ) > {
13481347 if ( self . compiled . contains ( & unit. pkg . package_id ( ) )
13491348 && !unit. mode . is_doc ( )
@@ -1357,7 +1356,7 @@ impl<'cfg> DrainState<'cfg> {
13571356 match fresh {
13581357 // Any dirty stage which runs at least one command gets printed as
13591358 // being a compiled package.
1360- Dirty => {
1359+ Dirty ( dirty_reason ) => {
13611360 if unit. mode . is_doc ( ) {
13621361 self . documented . insert ( unit. pkg . package_id ( ) ) ;
13631362 config. shell ( ) . status ( "Documenting" , & unit. pkg ) ?;
0 commit comments