about summary refs log tree commit diff
path: root/src/libsyntax/json.rs
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2019-05-02 05:06:33 +0300
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2019-05-07 04:49:54 +0300
commit1618c079abc7cb97afe3cbcf5a7ff1f9412775bc (patch)
treea50f24236321e42afb0216596ec09993cd865c1b /src/libsyntax/json.rs
parentf0e43fc98671f76f7cdcc07cfa17fb2362c132ea (diff)
downloadrust-1618c079abc7cb97afe3cbcf5a7ff1f9412775bc.tar.gz
rust-1618c079abc7cb97afe3cbcf5a7ff1f9412775bc.zip
rustc: rename -Z emit-directives to -Z emit-artifact-notifications and simplify the output.
Diffstat (limited to 'src/libsyntax/json.rs')
-rw-r--r--src/libsyntax/json.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libsyntax/json.rs b/src/libsyntax/json.rs
index 65f8d0e77d7..2dd2ecb7493 100644
--- a/src/libsyntax/json.rs
+++ b/src/libsyntax/json.rs
@@ -19,6 +19,7 @@ use errors::emitter::{Emitter, HumanReadableErrorType};
 use syntax_pos::{MacroBacktrace, Span, SpanLabel, MultiSpan};
 use rustc_data_structures::sync::{self, Lrc};
 use std::io::{self, Write};
+use std::path::Path;
 use std::vec;
 use std::sync::{Arc, Mutex};
 
@@ -91,15 +92,15 @@ impl Emitter for JsonEmitter {
         }
     }
 
-    fn maybe_emit_json_directive(&mut self, directive: String) {
-        let data = Directive { directive };
+    fn emit_artifact_notification(&mut self, path: &Path) {
+        let data = ArtifactNotification { artifact: path };
         let result = if self.pretty {
             writeln!(&mut self.dst, "{}", as_pretty_json(&data))
         } else {
             writeln!(&mut self.dst, "{}", as_json(&data))
         };
         if let Err(e) = result {
-            panic!("failed to print message: {:?}", e);
+            panic!("failed to print notification: {:?}", e);
         }
     }
 }
@@ -181,9 +182,9 @@ struct DiagnosticCode {
 }
 
 #[derive(RustcEncodable)]
-struct Directive {
-    /// The directive itself.
-    directive: String,
+struct ArtifactNotification<'a> {
+    /// The path of the artifact.
+    artifact: &'a Path,
 }
 
 impl Diagnostic {