@@ -233,15 +233,15 @@ fn rustc<'a, 'cfg>(
233233 let extract_rendered_errors = if rmeta_produced {
234234 match cx. bcx . build_config . message_format {
235235 MessageFormat :: Json => {
236- rustc. arg ( "-Zemit-directives " ) ;
236+ rustc. arg ( "-Zemit-artifact-notifications " ) ;
237237 false
238238 }
239239 MessageFormat :: Human => {
240240 rustc
241241 . arg ( "--error-format=json" )
242242 . arg ( "--json-rendered=termcolor" )
243243 . arg ( "-Zunstable-options" )
244- . arg ( "-Zemit-directives " ) ;
244+ . arg ( "-Zemit-artifact-notifications " ) ;
245245 true
246246 }
247247
@@ -1119,7 +1119,7 @@ fn on_stderr_line(
11191119 }
11201120
11211121 // In some modes of execution we will execute rustc with `-Z
1122- // emit-directives ` to look for metadata files being produced. When this
1122+ // emit-artifact-notifications ` to look for metadata files being produced. When this
11231123 // happens we may be able to start subsequent compilations more quickly than
11241124 // waiting for an entire compile to finish, possibly using more parallelism
11251125 // available to complete a compilation session more quickly.
@@ -1128,16 +1128,16 @@ fn on_stderr_line(
11281128 // that a metadata file has been produced.
11291129 if look_for_metadata_directive {
11301130 #[ derive( serde:: Deserialize ) ]
1131- struct CompilerDirective {
1132- directive : String ,
1131+ struct ArtifactNotification {
1132+ artifact : String ,
11331133 }
1134- if let Ok ( directive ) = serde_json:: from_str :: < CompilerDirective > ( compiler_message. get ( ) ) {
1135- log:: trace!( "found directive from rustc: `{}`" , directive . directive ) ;
1136- if directive . directive . starts_with ( "metadata file written ") {
1134+ if let Ok ( artifact ) = serde_json:: from_str :: < ArtifactNotification > ( compiler_message. get ( ) ) {
1135+ log:: trace!( "found directive from rustc: `{}`" , artifact . artifact ) ;
1136+ if artifact . artifact . ends_with ( ".rmeta ") {
11371137 log:: debug!( "looks like metadata finished early!" ) ;
11381138 state. rmeta_produced ( ) ;
1139- return Ok ( ( ) )
11401139 }
1140+ return Ok ( ( ) )
11411141 }
11421142 }
11431143
0 commit comments