@@ -180,6 +180,7 @@ impl<'a> Arguments<'a> {
180
180
/// unsafety, but will ignore invalid .
181
181
#[ doc( hidden) ] #[ inline]
182
182
#[ unstable = "implementation detail of the `format_args!` macro" ]
183
+ #[ cfg( stage0) ] // SNAP 9e4e524
183
184
pub fn with_placeholders ( pieces : & ' a [ & ' a str ] ,
184
185
fmt : & ' a [ rt:: Argument < ' a > ] ,
185
186
args : & ' a [ Argument < ' a > ] ) -> Arguments < ' a > {
@@ -189,6 +190,24 @@ impl<'a> Arguments<'a> {
189
190
args : args
190
191
}
191
192
}
193
+ /// This function is used to specify nonstandard formatting parameters.
194
+ /// The `pieces` array must be at least as long as `fmt` to construct
195
+ /// a valid Arguments structure. Also, any `Count` within `fmt` that is
196
+ /// `CountIsParam` or `CountIsNextParam` has to point to an argument
197
+ /// created with `argumentuint`. However, failing to do so doesn't cause
198
+ /// unsafety, but will ignore invalid .
199
+ #[ doc( hidden) ] #[ inline]
200
+ #[ unstable = "implementation detail of the `format_args!` macro" ]
201
+ #[ cfg( not( stage0) ) ]
202
+ pub fn with_placeholders ( pieces : & ' a [ & ' a str ] ,
203
+ fmt : & ' a [ rt:: Argument ] ,
204
+ args : & ' a [ Argument < ' a > ] ) -> Arguments < ' a > {
205
+ Arguments {
206
+ pieces : pieces,
207
+ fmt : Some ( fmt) ,
208
+ args : args
209
+ }
210
+ }
192
211
}
193
212
194
213
/// This structure represents a safely precompiled version of a format string
@@ -207,7 +226,11 @@ pub struct Arguments<'a> {
207
226
pieces : & ' a [ & ' a str ] ,
208
227
209
228
// Placeholder specs, or `None` if all specs are default (as in "{}{}").
229
+ // SNAP 9e4e524
230
+ #[ cfg( stage0) ]
210
231
fmt : Option < & ' a [ rt:: Argument < ' a > ] > ,
232
+ #[ cfg( not( stage0) ) ]
233
+ fmt : Option < & ' a [ rt:: Argument ] > ,
211
234
212
235
// Dynamic arguments for interpolation, to be interleaved with string
213
236
// pieces. (Every argument is preceded by a string piece.)
0 commit comments