@@ -26,6 +26,7 @@ use std::borrow::Cow;
2626use std:: cell:: Cell ;
2727use std:: { error, fmt} ;
2828use std:: panic;
29+ use std:: path:: Path ;
2930
3031use termcolor:: { ColorSpec , Color } ;
3132
@@ -294,16 +295,9 @@ impl error::Error for ExplicitBug {
294295pub use diagnostic:: { Diagnostic , SubDiagnostic , DiagnosticStyledString , DiagnosticId } ;
295296pub use diagnostic_builder:: DiagnosticBuilder ;
296297
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.
307301pub struct Handler {
308302 pub flags : HandlerFlags ,
309303
@@ -775,8 +769,8 @@ impl Handler {
775769 }
776770 }
777771
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 ) ;
780774 }
781775}
782776
0 commit comments