@@ -26,6 +26,7 @@ use std::borrow::Cow;
26
26
use std:: cell:: Cell ;
27
27
use std:: { error, fmt} ;
28
28
use std:: panic;
29
+ use std:: path:: Path ;
29
30
30
31
use termcolor:: { ColorSpec , Color } ;
31
32
@@ -294,16 +295,9 @@ impl error::Error for ExplicitBug {
294
295
pub use diagnostic:: { Diagnostic , SubDiagnostic , DiagnosticStyledString , DiagnosticId } ;
295
296
pub use diagnostic_builder:: DiagnosticBuilder ;
296
297
297
- /// A handler deals with two kinds of compiler output.
298
- /// - Errors: certain errors (fatal, bug, unimpl) may cause immediate exit,
299
- /// others log errors for later reporting.
300
- /// - Directives: with --error-format=json, the compiler produces directives
301
- /// that indicate when certain actions have completed, which are useful for
302
- /// Cargo. They may change at any time and should not be considered a public
303
- /// API.
304
- ///
305
- /// This crate's name (rustc_errors) doesn't encompass the directives, because
306
- /// directives were added much later.
298
+ /// A handler deals with errors and other compiler output.
299
+ /// Certain errors (fatal, bug, unimpl) may cause immediate exit,
300
+ /// others log errors for later reporting.
307
301
pub struct Handler {
308
302
pub flags : HandlerFlags ,
309
303
@@ -775,8 +769,8 @@ impl Handler {
775
769
}
776
770
}
777
771
778
- pub fn maybe_emit_json_directive ( & self , directive : String ) {
779
- self . emitter . borrow_mut ( ) . maybe_emit_json_directive ( directive ) ;
772
+ pub fn emit_artifact_notification ( & self , path : & Path ) {
773
+ self . emitter . borrow_mut ( ) . emit_artifact_notification ( path ) ;
780
774
}
781
775
}
782
776
0 commit comments