@@ -54,6 +54,7 @@ impl<'a, 'b: 'a> fmt::Write for PadAdapter<'a, 'b> {
54
54
///
55
55
/// Constructed by the `Formatter::debug_struct` method.
56
56
#[ must_use]
57
+ #[ stable( feature = "debug_builders" , since = "1.2.0" ) ]
57
58
pub struct DebugStruct < ' a , ' b : ' a > {
58
59
fmt : & ' a mut fmt:: Formatter < ' b > ,
59
60
result : fmt:: Result ,
@@ -72,7 +73,7 @@ pub fn debug_struct_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>, name: &str)
72
73
73
74
impl < ' a , ' b : ' a > DebugStruct < ' a , ' b > {
74
75
/// Adds a new field to the generated struct output.
75
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
76
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
76
77
pub fn field ( & mut self , name : & str , value : & fmt:: Debug ) -> & mut DebugStruct < ' a , ' b > {
77
78
self . result = self . result . and_then ( |_| {
78
79
let prefix = if self . has_fields {
@@ -94,7 +95,7 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> {
94
95
}
95
96
96
97
/// Finishes output and returns any error encountered.
97
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
98
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
98
99
pub fn finish ( & mut self ) -> fmt:: Result {
99
100
if self . has_fields {
100
101
self . result = self . result . and_then ( |_| {
@@ -117,6 +118,7 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> {
117
118
///
118
119
/// Constructed by the `Formatter::debug_tuple` method.
119
120
#[ must_use]
121
+ #[ stable( feature = "debug_builders" , since = "1.2.0" ) ]
120
122
pub struct DebugTuple < ' a , ' b : ' a > {
121
123
fmt : & ' a mut fmt:: Formatter < ' b > ,
122
124
result : fmt:: Result ,
@@ -134,7 +136,7 @@ pub fn debug_tuple_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>, name: &str) -> D
134
136
135
137
impl < ' a , ' b : ' a > DebugTuple < ' a , ' b > {
136
138
/// Adds a new field to the generated tuple struct output.
137
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
139
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
138
140
pub fn field ( & mut self , value : & fmt:: Debug ) -> & mut DebugTuple < ' a , ' b > {
139
141
self . result = self . result . and_then ( |_| {
140
142
let ( prefix, space) = if self . has_fields {
@@ -156,7 +158,7 @@ impl<'a, 'b: 'a> DebugTuple<'a, 'b> {
156
158
}
157
159
158
160
/// Finishes output and returns any error encountered.
159
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
161
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
160
162
pub fn finish ( & mut self ) -> fmt:: Result {
161
163
if self . has_fields {
162
164
self . result = self . result . and_then ( |_| {
@@ -211,6 +213,7 @@ impl<'a, 'b: 'a> DebugInner<'a, 'b> {
211
213
///
212
214
/// Constructed by the `Formatter::debug_set` method.
213
215
#[ must_use]
216
+ #[ stable( feature = "debug_builders" , since = "1.2.0" ) ]
214
217
pub struct DebugSet < ' a , ' b : ' a > {
215
218
inner : DebugInner < ' a , ' b > ,
216
219
}
@@ -228,14 +231,14 @@ pub fn debug_set_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugSet<'a, 'b
228
231
229
232
impl < ' a , ' b : ' a > DebugSet < ' a , ' b > {
230
233
/// Adds a new entry to the set output.
231
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
234
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
232
235
pub fn entry ( & mut self , entry : & fmt:: Debug ) -> & mut DebugSet < ' a , ' b > {
233
236
self . inner . entry ( entry) ;
234
237
self
235
238
}
236
239
237
240
/// Adds the contents of an iterator of entries to the set output.
238
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
241
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
239
242
pub fn entries < D , I > ( & mut self , entries : I ) -> & mut DebugSet < ' a , ' b >
240
243
where D : fmt:: Debug , I : IntoIterator < Item =D > {
241
244
for entry in entries {
@@ -245,7 +248,7 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> {
245
248
}
246
249
247
250
/// Finishes output and returns any error encountered.
248
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
251
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
249
252
pub fn finish ( & mut self ) -> fmt:: Result {
250
253
self . inner . finish ( ) ;
251
254
self . inner . result . and_then ( |_| self . inner . fmt . write_str ( "}" ) )
@@ -256,6 +259,7 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> {
256
259
///
257
260
/// Constructed by the `Formatter::debug_list` method.
258
261
#[ must_use]
262
+ #[ stable( feature = "debug_builders" , since = "1.2.0" ) ]
259
263
pub struct DebugList < ' a , ' b : ' a > {
260
264
inner : DebugInner < ' a , ' b > ,
261
265
}
@@ -273,14 +277,14 @@ pub fn debug_list_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugList<'a,
273
277
274
278
impl < ' a , ' b : ' a > DebugList < ' a , ' b > {
275
279
/// Adds a new entry to the list output.
276
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
280
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
277
281
pub fn entry ( & mut self , entry : & fmt:: Debug ) -> & mut DebugList < ' a , ' b > {
278
282
self . inner . entry ( entry) ;
279
283
self
280
284
}
281
285
282
286
/// Adds the contents of an iterator of entries to the list output.
283
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
287
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
284
288
pub fn entries < D , I > ( & mut self , entries : I ) -> & mut DebugList < ' a , ' b >
285
289
where D : fmt:: Debug , I : IntoIterator < Item =D > {
286
290
for entry in entries {
@@ -290,7 +294,7 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> {
290
294
}
291
295
292
296
/// Finishes output and returns any error encountered.
293
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
297
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
294
298
pub fn finish ( & mut self ) -> fmt:: Result {
295
299
self . inner . finish ( ) ;
296
300
self . inner . result . and_then ( |_| self . inner . fmt . write_str ( "]" ) )
@@ -301,6 +305,7 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> {
301
305
///
302
306
/// Constructed by the `Formatter::debug_map` method.
303
307
#[ must_use]
308
+ #[ stable( feature = "debug_builders" , since = "1.2.0" ) ]
304
309
pub struct DebugMap < ' a , ' b : ' a > {
305
310
fmt : & ' a mut fmt:: Formatter < ' b > ,
306
311
result : fmt:: Result ,
@@ -318,7 +323,7 @@ pub fn debug_map_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugMap<'a, 'b
318
323
319
324
impl < ' a , ' b : ' a > DebugMap < ' a , ' b > {
320
325
/// Adds a new entry to the map output.
321
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
326
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
322
327
pub fn entry ( & mut self , key : & fmt:: Debug , value : & fmt:: Debug ) -> & mut DebugMap < ' a , ' b > {
323
328
self . result = self . result . and_then ( |_| {
324
329
if self . is_pretty ( ) {
@@ -336,7 +341,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> {
336
341
}
337
342
338
343
/// Adds the contents of an iterator of entries to the map output.
339
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
344
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
340
345
pub fn entries < K , V , I > ( & mut self , entries : I ) -> & mut DebugMap < ' a , ' b >
341
346
where K : fmt:: Debug , V : fmt:: Debug , I : IntoIterator < Item =( K , V ) > {
342
347
for ( k, v) in entries {
@@ -346,7 +351,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> {
346
351
}
347
352
348
353
/// Finishes output and returns any error encountered.
349
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
354
+ #[ stable ( feature = "debug_builders" , since = "1.2.0 " ) ]
350
355
pub fn finish ( & mut self ) -> fmt:: Result {
351
356
let prefix = if self . is_pretty ( ) && self . has_fields { "\n " } else { "" } ;
352
357
self . result . and_then ( |_| write ! ( self . fmt, "{}}}" , prefix) )
0 commit comments