]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_parse_format/src/lib.rs
Rollup merge of #100473 - compiler-errors:normalize-the-fn-def-sig-plz, r=lcnr
[rust.git] / compiler / rustc_parse_format / src / lib.rs
index b63a173cc29e6cd3a5dc8806dacc825e6949bb3e..a9e502016aa8d4ac2392a8ce4fada05db3d14563 100644 (file)
@@ -167,6 +167,8 @@ pub enum Count<'a> {
     CountIsName(&'a str, InnerSpan),
     /// The count is specified by the argument at the given index.
     CountIsParam(usize),
+    /// The count is specified by a star (like in `{:.*}`) that refers to the argument at the given index.
+    CountIsStar(usize),
     /// The count is implied and cannot be explicitly specified.
     CountImplied,
 }
@@ -618,7 +620,7 @@ fn format(&mut self) -> FormatSpec<'a> {
                 // We can do this immediately as `position` is resolved later.
                 let i = self.curarg;
                 self.curarg += 1;
-                spec.precision = CountIsParam(i);
+                spec.precision = CountIsStar(i);
             } else {
                 spec.precision = self.count(start + 1);
             }