diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-06-22 08:38:24 +1000 | 
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-06-23 11:10:43 +1000 | 
| commit | 7586e79af8771639e57c7d207b51fb9096e5359a (patch) | |
| tree | 1cd9b464b3ff8cf77d091f25a155fe75fe829f24 /compiler/rustc_builtin_macros/src/deriving/decodable.rs | |
| parent | dc80ca78b6ec2b6bba02560470347433bcd0bb3c (diff) | |
| download | rust-7586e79af8771639e57c7d207b51fb9096e5359a.tar.gz rust-7586e79af8771639e57c7d207b51fb9096e5359a.zip | |
Rename some `ExtCtxt` methods.
The new names are more accurate. Co-authored-by: Scott McMurray <scottmcm@users.noreply.github.com>
Diffstat (limited to 'compiler/rustc_builtin_macros/src/deriving/decodable.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/deriving/decodable.rs | 5 | 
1 files changed, 2 insertions, 3 deletions
| diff --git a/compiler/rustc_builtin_macros/src/deriving/decodable.rs b/compiler/rustc_builtin_macros/src/deriving/decodable.rs index 1d892b20729..b39f35a9d40 100644 --- a/compiler/rustc_builtin_macros/src/deriving/decodable.rs +++ b/compiler/rustc_builtin_macros/src/deriving/decodable.rs @@ -162,14 +162,13 @@ fn decodable_substructure( cx.expr_match(trait_span, cx.expr_ident(trait_span, variant), arms), ); let lambda = cx.lambda(trait_span, vec![blkarg, variant], result); - let variant_vec = cx.expr_vec(trait_span, variants); - let variant_vec = cx.expr_addr_of(trait_span, variant_vec); + let variant_array_ref = cx.expr_array_ref(trait_span, variants); let fn_read_enum_variant_path: Vec<_> = cx.def_site_path(&[sym::rustc_serialize, sym::Decoder, sym::read_enum_variant]); let result = cx.expr_call_global( trait_span, fn_read_enum_variant_path, - vec![blkdecoder, variant_vec, lambda], + vec![blkdecoder, variant_array_ref, lambda], ); let fn_read_enum_path: Vec<_> = cx.def_site_path(&[sym::rustc_serialize, sym::Decoder, sym::read_enum]); | 
