diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2022-02-09 17:10:45 -0500 | 
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2022-02-20 18:58:22 -0500 | 
| commit | c6bd6b444ca7718eca5bbd86a4438e779f31dc5e (patch) | |
| tree | ad83c65cc0e97f1bf122bdfec54fe4c4a425abbf /compiler/rustc_macros/src | |
| parent | 60b71f56e73fc139eababa00aa8f1b740cb7d445 (diff) | |
| download | rust-c6bd6b444ca7718eca5bbd86a4438e779f31dc5e.tar.gz rust-c6bd6b444ca7718eca5bbd86a4438e779f31dc5e.zip | |
Delete Decoder::read_enum
Diffstat (limited to 'compiler/rustc_macros/src')
| -rw-r--r-- | compiler/rustc_macros/src/serialize.rs | 21 | 
1 files changed, 8 insertions, 13 deletions
| diff --git a/compiler/rustc_macros/src/serialize.rs b/compiler/rustc_macros/src/serialize.rs index 6c5461505fa..91a076fa6f6 100644 --- a/compiler/rustc_macros/src/serialize.rs +++ b/compiler/rustc_macros/src/serialize.rs @@ -73,20 +73,15 @@ fn decodable_body( variants.len() ); quote! { - ::rustc_serialize::Decoder::read_enum( + ::rustc_serialize::Decoder::read_enum_variant( __decoder, - |__decoder| { - ::rustc_serialize::Decoder::read_enum_variant( - __decoder, - &[#names], - |__decoder, __variant_idx| { - match __variant_idx { - #match_inner - _ => panic!(#message), - } - }) - } - ) + &[#names], + |__decoder, __variant_idx| { + match __variant_idx { + #match_inner + _ => panic!(#message), + } + }) } } }; | 
