summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2023-04-20 18:05:35 +0200
committerMara Bos <m-ou.se@m-ou.se>2023-04-20 18:05:35 +0200
commit938efe6f498b24734e68647aefb1e17459ef49b2 (patch)
tree50238dea89413b2af2abdf5297147e56d31615d2
parentbc11b459af451e4c35bf611a0baacba2b7919629 (diff)
downloadrust-938efe6f498b24734e68647aefb1e17459ef49b2.tar.gz
rust-938efe6f498b24734e68647aefb1e17459ef49b2.zip
Rename fmt::rt::Argument to Placeholder.
-rw-r--r--library/core/src/fmt/mod.rs8
-rw-r--r--library/core/src/fmt/rt.rs5
2 files changed, 6 insertions, 7 deletions
diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs
index 6988411095f..bbbfe06656c 100644
--- a/library/core/src/fmt/mod.rs
+++ b/library/core/src/fmt/mod.rs
@@ -428,7 +428,7 @@ impl<'a> Arguments<'a> {
     /// An `UnsafeArg` is required because the following invariants must be held
     /// in order for this function to be safe:
     /// 1. The `pieces` slice must be at least as long as `fmt`.
-    /// 2. Every [`rt::Argument::position`] value within `fmt` must be a
+    /// 2. Every [`rt::Placeholder::position`] value within `fmt` must be a
     ///    valid index of `args`.
     /// 3. Every [`rt::Count::Param`] within `fmt` must contain a valid index of
     ///    `args`.
@@ -438,7 +438,7 @@ impl<'a> Arguments<'a> {
     pub fn new_v1_formatted(
         pieces: &'a [&'static str],
         args: &'a [ArgumentV1<'a>],
-        fmt: &'a [rt::Argument],
+        fmt: &'a [rt::Placeholder],
         _unsafe_arg: UnsafeArg,
     ) -> Arguments<'a> {
         Arguments { pieces, fmt: Some(fmt), args }
@@ -500,7 +500,7 @@ pub struct Arguments<'a> {
     pieces: &'a [&'static str],
 
     // Placeholder specs, or `None` if all specs are default (as in "{}{}").
-    fmt: Option<&'a [rt::Argument]>,
+    fmt: Option<&'a [rt::Placeholder]>,
 
     // Dynamic arguments for interpolation, to be interleaved with string
     // pieces. (Every argument is preceded by a string piece.)
@@ -1276,7 +1276,7 @@ pub fn write(output: &mut dyn Write, args: Arguments<'_>) -> Result {
     Ok(())
 }
 
-unsafe fn run(fmt: &mut Formatter<'_>, arg: &rt::Argument, args: &[ArgumentV1<'_>]) -> Result {
+unsafe fn run(fmt: &mut Formatter<'_>, arg: &rt::Placeholder, args: &[ArgumentV1<'_>]) -> Result {
     fmt.fill = arg.format.fill;
     fmt.align = arg.format.align;
     fmt.flags = arg.format.flags;
diff --git a/library/core/src/fmt/rt.rs b/library/core/src/fmt/rt.rs
index 58dbe314d08..497b2e27739 100644
--- a/library/core/src/fmt/rt.rs
+++ b/library/core/src/fmt/rt.rs
@@ -5,8 +5,7 @@
 
 #[lang = "format_placeholder"]
 #[derive(Copy, Clone)]
-// FIXME: Rename this to Placeholder
-pub struct Argument {
+pub struct Placeholder {
     pub position: usize,
     pub format: FormatSpec,
 }
@@ -20,7 +19,7 @@ pub struct FormatSpec {
     pub width: Count,
 }
 
-impl Argument {
+impl Placeholder {
     #[inline(always)]
     pub const fn new(
         position: usize,