|
14 | 14 | //! These definitions are similar to their `ct` equivalents, but differ in that
|
15 | 15 | //! these can be statically allocated and are slightly optimized for the runtime
|
16 | 16 |
|
17 |
| -#![stable(feature = "rust1", since = "1.0.0")] |
| 17 | +#![cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
| 18 | +#![cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))] |
18 | 19 |
|
19 | 20 | #[derive(Copy, Clone)]
|
20 |
| -#[stable(feature = "rust1", since = "1.0.0")] |
| 21 | +#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
21 | 22 | pub struct Argument {
|
22 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 23 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
23 | 24 | pub position: Position,
|
24 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 25 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
25 | 26 | pub format: FormatSpec,
|
26 | 27 | }
|
27 | 28 |
|
28 | 29 | #[derive(Copy, Clone)]
|
29 |
| -#[stable(feature = "rust1", since = "1.0.0")] |
| 30 | +#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
30 | 31 | pub struct FormatSpec {
|
31 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 32 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
32 | 33 | pub fill: char,
|
33 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 34 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
34 | 35 | pub align: Alignment,
|
35 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 36 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
36 | 37 | pub flags: u32,
|
37 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 38 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
38 | 39 | pub precision: Count,
|
39 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 40 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
40 | 41 | pub width: Count,
|
41 | 42 | }
|
42 | 43 |
|
43 | 44 | /// Possible alignments that can be requested as part of a formatting directive.
|
44 | 45 | #[derive(Copy, Clone, PartialEq)]
|
45 |
| -#[stable(feature = "rust1", since = "1.0.0")] |
| 46 | +#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
46 | 47 | pub enum Alignment {
|
47 | 48 | /// Indication that contents should be left-aligned.
|
48 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 49 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
49 | 50 | Left,
|
50 | 51 | /// Indication that contents should be right-aligned.
|
51 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 52 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
52 | 53 | Right,
|
53 | 54 | /// Indication that contents should be center-aligned.
|
54 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 55 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
55 | 56 | Center,
|
56 | 57 | /// No alignment was requested.
|
57 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 58 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
58 | 59 | Unknown,
|
59 | 60 | }
|
60 | 61 |
|
61 | 62 | #[derive(Copy, Clone)]
|
62 |
| -#[stable(feature = "rust1", since = "1.0.0")] |
| 63 | +#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
63 | 64 | pub enum Count {
|
64 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 65 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
65 | 66 | Is(usize),
|
66 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 67 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
67 | 68 | Param(usize),
|
68 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 69 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
69 | 70 | NextParam,
|
70 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 71 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
71 | 72 | Implied,
|
72 | 73 | }
|
73 | 74 |
|
74 | 75 | #[derive(Copy, Clone)]
|
75 |
| -#[stable(feature = "rust1", since = "1.0.0")] |
| 76 | +#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
76 | 77 | pub enum Position {
|
77 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 78 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
78 | 79 | Next,
|
79 |
| - #[stable(feature = "rust1", since = "1.0.0")] |
| 80 | + #[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))] |
80 | 81 | At(usize)
|
81 | 82 | }
|
0 commit comments