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/format.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/format.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/format.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_builtin_macros/src/format.rs b/compiler/rustc_builtin_macros/src/format.rs index 10348c4967c..6c2ac343544 100644 --- a/compiler/rustc_builtin_macros/src/format.rs +++ b/compiler/rustc_builtin_macros/src/format.rs @@ -776,7 +776,7 @@ impl<'a, 'b> Context<'a, 'b> { // First, build up the static array which will become our precompiled // format "string" - let pieces = self.ecx.expr_vec_slice(self.fmtsp, self.str_pieces); + let pieces = self.ecx.expr_array_ref(self.fmtsp, self.str_pieces); // We need to construct a &[ArgumentV1] to pass into the fmt::Arguments // constructor. In general the expressions in this slice might be @@ -849,7 +849,7 @@ impl<'a, 'b> Context<'a, 'b> { fmt_args.push(Context::format_arg(self.ecx, self.macsp, span, arg_ty, arg)); } - let args_array = self.ecx.expr_vec(self.macsp, fmt_args); + let args_array = self.ecx.expr_array(self.macsp, fmt_args); let args_slice = self.ecx.expr_addr_of( self.macsp, if no_need_for_match { @@ -879,7 +879,7 @@ impl<'a, 'b> Context<'a, 'b> { } else { // Build up the static array which will store our precompiled // nonstandard placeholders, if there are any. - let fmt = self.ecx.expr_vec_slice(self.macsp, self.pieces); + let fmt = self.ecx.expr_array_ref(self.macsp, self.pieces); let path = self.ecx.std_path(&[sym::fmt, sym::UnsafeArg, sym::new]); let unsafe_arg = self.ecx.expr_call_global(self.macsp, path, Vec::new()); |
