about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/json.rs
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-06-01 19:12:55 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2021-06-01 19:29:11 +0200
commita2c4affe860ec53647b902f257e7e575f0350854 (patch)
treeae84fef72226be77f6884839120f5018aec9c7b7 /compiler/rustc_errors/src/json.rs
parent7f9ab0300cd66f6f616e03ea90b2d71af474bf28 (diff)
downloadrust-a2c4affe860ec53647b902f257e7e575f0350854.tar.gz
rust-a2c4affe860ec53647b902f257e7e575f0350854.zip
Remove unused functions and arguments from rustc_serialize
Diffstat (limited to 'compiler/rustc_errors/src/json.rs')
-rw-r--r--compiler/rustc_errors/src/json.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/json.rs b/compiler/rustc_errors/src/json.rs
index 5d175a3ade9..72395bd31ec 100644
--- a/compiler/rustc_errors/src/json.rs
+++ b/compiler/rustc_errors/src/json.rs
@@ -216,7 +216,7 @@ macro_rules! encode_fields {
             $(
                 $enc.emit_struct_field(
                     stringify!($name),
-                    idx,
+                    idx == 0,
                     |enc| $name.encode(enc),
                 )?;
                 idx += 1;
@@ -229,7 +229,7 @@ macro_rules! encode_fields {
 // Special-case encoder to skip tool_metadata if not set
 impl<E: Encoder> Encodable<E> for Diagnostic {
     fn encode(&self, s: &mut E) -> Result<(), E::Error> {
-        s.emit_struct("diagnostic", 7, |s| {
+        s.emit_struct(false, |s| {
             let mut idx = 0;
 
             idx = encode_fields!(