summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jsgf@fb.com>2019-05-21 12:38:46 -0700
committerJeremy Fitzhardinge <jsgf@fb.com>2019-05-21 13:51:36 -0700
commit6c3862594210cc0a5e60fbad32d3aab7a4fb512c (patch)
tree8843a8f4a17c54514ab2937b87e3ea0b9ad93806 /src/libsyntax
parent09189591c4c4f6784ffd4bbe99eaefbfe1d5e4a4 (diff)
downloadrust-6c3862594210cc0a5e60fbad32d3aab7a4fb512c.tar.gz
rust-6c3862594210cc0a5e60fbad32d3aab7a4fb512c.zip
Make -Zemit-artifact-notifications also emit the artifact type
This is easier for tooling to handle than trying to reverse-engineer it from the filename extension.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/json.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libsyntax/json.rs b/src/libsyntax/json.rs
index 2dd2ecb7493..767ab74355e 100644
--- a/src/libsyntax/json.rs
+++ b/src/libsyntax/json.rs
@@ -92,8 +92,8 @@ impl Emitter for JsonEmitter {
         }
     }
 
-    fn emit_artifact_notification(&mut self, path: &Path) {
-        let data = ArtifactNotification { artifact: path };
+    fn emit_artifact_notification(&mut self, path: &Path, artifact_type: &str) {
+        let data = ArtifactNotification { artifact: path, emit: artifact_type };
         let result = if self.pretty {
             writeln!(&mut self.dst, "{}", as_pretty_json(&data))
         } else {
@@ -185,6 +185,8 @@ struct DiagnosticCode {
 struct ArtifactNotification<'a> {
     /// The path of the artifact.
     artifact: &'a Path,
+    /// What kind of artifact we're emitting.
+    emit: &'a str,
 }
 
 impl Diagnostic {