diff options
| author | bors <bors@rust-lang.org> | 2021-06-07 14:40:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-06-07 14:40:26 +0000 |
| commit | e4a60327063e82413eed50a10df3b7d19b77bda0 (patch) | |
| tree | fb31c3bb7cfdf9ca01ff89fdb671f2a9a349d0da /compiler/rustc_errors/src | |
| parent | 2312ff1a850db449b79fd3c4b215395cd2598c25 (diff) | |
| parent | a2c4affe860ec53647b902f257e7e575f0350854 (diff) | |
| download | rust-e4a60327063e82413eed50a10df3b7d19b77bda0.tar.gz rust-e4a60327063e82413eed50a10df3b7d19b77bda0.zip | |
Auto merge of #85903 - bjorn3:rustc_serialize_cleanup, r=varkor
Remove unused functions and arguments from rustc_serialize
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/json.rs | 4 |
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!( |
