]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/fmt/rt.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / libcore / fmt / rt.rs
index 1feebbb35b69ea6c602cdcc2ad6732f544ce7c9f..1c88eb6ddfa17819195e9e796fe043be80b25857 100644 (file)
 //! These definitions are similar to their `ct` equivalents, but differ in that
 //! these can be statically allocated and are slightly optimized for the runtime
 
-use option::Option;
-
-#[doc(hidden)]
-pub enum Piece<'a> {
-    String(&'a str),
-    // FIXME(#8259): this shouldn't require the unit-value here
-    CurrentArgument(()),
-    Argument(Argument<'a>),
-}
-
 #[doc(hidden)]
 pub struct Argument<'a> {
     pub position: Position,
     pub format: FormatSpec,
-    pub method: Option<&'a Method<'a>>
 }
 
 #[doc(hidden)]
@@ -47,6 +36,8 @@ pub enum Alignment {
     AlignLeft,
     /// Indication that contents should be right-aligned.
     AlignRight,
+    /// Indication that contents should be center-aligned.
+    AlignCenter,
     /// No alignment was requested.
     AlignUnknown,
 }
@@ -80,36 +71,3 @@ pub enum Flag {
     /// being aware of the sign to be printed.
     FlagSignAwareZeroPad,
 }
-
-#[doc(hidden)]
-pub enum Method<'a> {
-    Plural(Option<uint>, &'a [PluralArm<'a>], &'a [Piece<'a>]),
-    Select(&'a [SelectArm<'a>], &'a [Piece<'a>]),
-}
-
-#[doc(hidden)]
-pub enum PluralSelector {
-    Keyword(PluralKeyword),
-    Literal(uint),
-}
-
-#[doc(hidden)]
-pub enum PluralKeyword {
-    Zero,
-    One,
-    Two,
-    Few,
-    Many,
-}
-
-#[doc(hidden)]
-pub struct PluralArm<'a> {
-    pub selector: PluralSelector,
-    pub result: &'a [Piece<'a>],
-}
-
-#[doc(hidden)]
-pub struct SelectArm<'a> {
-    pub selector: &'a str,
-    pub result: &'a [Piece<'a>],
-}