@@ -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.1.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.1.0 " ) ]
76
77
pub fn field ( mut self , name : & str , value : & fmt:: Debug ) -> DebugStruct < ' a , ' b > {
77
78
self . result = self . result . and_then ( |_| {
78
79
let prefix = if self . has_fields {
@@ -95,7 +96,7 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> {
95
96
96
97
/// Consumes the `DebugStruct`, finishing output and returning any error
97
98
/// encountered.
98
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
99
+ #[ stable ( feature = "debug_builders" , since = "1.1.0 " ) ]
99
100
pub fn finish ( mut self ) -> fmt:: Result {
100
101
if self . has_fields {
101
102
self . result = self . result . and_then ( |_| {
@@ -118,6 +119,7 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> {
118
119
///
119
120
/// Constructed by the `Formatter::debug_tuple` method.
120
121
#[ must_use]
122
+ #[ stable( feature = "debug_builders" , since = "1.1.0" ) ]
121
123
pub struct DebugTuple < ' a , ' b : ' a > {
122
124
fmt : & ' a mut fmt:: Formatter < ' b > ,
123
125
result : fmt:: Result ,
@@ -135,7 +137,7 @@ pub fn debug_tuple_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>, name: &str) -> D
135
137
136
138
impl < ' a , ' b : ' a > DebugTuple < ' a , ' b > {
137
139
/// Adds a new field to the generated tuple struct output.
138
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
140
+ #[ stable ( feature = "debug_builders" , since = "1.1.0 " ) ]
139
141
pub fn field ( mut self , value : & fmt:: Debug ) -> DebugTuple < ' a , ' b > {
140
142
self . result = self . result . and_then ( |_| {
141
143
let ( prefix, space) = if self . has_fields {
@@ -158,7 +160,7 @@ impl<'a, 'b: 'a> DebugTuple<'a, 'b> {
158
160
159
161
/// Consumes the `DebugTuple`, finishing output and returning any error
160
162
/// encountered.
161
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
163
+ #[ stable ( feature = "debug_builders" , since = "1.1.0 " ) ]
162
164
pub fn finish ( mut self ) -> fmt:: Result {
163
165
if self . has_fields {
164
166
self . result = self . result . and_then ( |_| {
@@ -199,7 +201,7 @@ impl<'a, 'b: 'a> DebugInner<'a, 'b> {
199
201
self . has_fields = true ;
200
202
}
201
203
202
- pub fn finish ( & mut self ) {
204
+ fn finish ( & mut self ) {
203
205
let prefix = if self . is_pretty ( ) && self . has_fields { "\n " } else { "" } ;
204
206
self . result = self . result . and_then ( |_| self . fmt . write_str ( prefix) ) ;
205
207
}
@@ -213,6 +215,7 @@ impl<'a, 'b: 'a> DebugInner<'a, 'b> {
213
215
///
214
216
/// Constructed by the `Formatter::debug_set` method.
215
217
#[ must_use]
218
+ #[ stable( feature = "debug_builders" , since = "1.1.0" ) ]
216
219
pub struct DebugSet < ' a , ' b : ' a > {
217
220
inner : DebugInner < ' a , ' b > ,
218
221
}
@@ -230,15 +233,15 @@ pub fn debug_set_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugSet<'a, 'b
230
233
231
234
impl < ' a , ' b : ' a > DebugSet < ' a , ' b > {
232
235
/// Adds a new entry to the set output.
233
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
236
+ #[ stable ( feature = "debug_builders" , since = "1.1.0 " ) ]
234
237
pub fn entry ( mut self , entry : & fmt:: Debug ) -> DebugSet < ' a , ' b > {
235
238
self . inner . entry ( entry) ;
236
239
self
237
240
}
238
241
239
242
/// Consumes the `DebugSet`, finishing output and returning any error
240
243
/// encountered.
241
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
244
+ #[ stable ( feature = "debug_builders" , since = "1.1.0 " ) ]
242
245
pub fn finish ( mut self ) -> fmt:: Result {
243
246
self . inner . finish ( ) ;
244
247
self . inner . result . and_then ( |_| self . inner . fmt . write_str ( "}" ) )
@@ -249,6 +252,7 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> {
249
252
///
250
253
/// Constructed by the `Formatter::debug_list` method.
251
254
#[ must_use]
255
+ #[ stable( feature = "debug_builders" , since = "1.1.0" ) ]
252
256
pub struct DebugList < ' a , ' b : ' a > {
253
257
inner : DebugInner < ' a , ' b > ,
254
258
}
@@ -266,15 +270,15 @@ pub fn debug_list_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugList<'a,
266
270
267
271
impl < ' a , ' b : ' a > DebugList < ' a , ' b > {
268
272
/// Adds a new entry to the set output.
269
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
273
+ #[ stable ( feature = "debug_builders" , since = "1.1.0 " ) ]
270
274
pub fn entry ( mut self , entry : & fmt:: Debug ) -> DebugList < ' a , ' b > {
271
275
self . inner . entry ( entry) ;
272
276
self
273
277
}
274
278
275
279
/// Consumes the `DebugSet`, finishing output and returning any error
276
280
/// encountered.
277
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
281
+ #[ stable ( feature = "debug_builders" , since = "1.1.0 " ) ]
278
282
pub fn finish ( mut self ) -> fmt:: Result {
279
283
self . inner . finish ( ) ;
280
284
self . inner . result . and_then ( |_| self . inner . fmt . write_str ( "]" ) )
@@ -285,6 +289,7 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> {
285
289
///
286
290
/// Constructed by the `Formatter::debug_map` method.
287
291
#[ must_use]
292
+ #[ stable( feature = "debug_builders" , since = "1.1.0" ) ]
288
293
pub struct DebugMap < ' a , ' b : ' a > {
289
294
fmt : & ' a mut fmt:: Formatter < ' b > ,
290
295
result : fmt:: Result ,
@@ -302,7 +307,7 @@ pub fn debug_map_new<'a, 'b>(fmt: &'a mut fmt::Formatter<'b>) -> DebugMap<'a, 'b
302
307
303
308
impl < ' a , ' b : ' a > DebugMap < ' a , ' b > {
304
309
/// Adds a new entry to the map output.
305
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
310
+ #[ stable ( feature = "debug_builders" , since = "1.1.0 " ) ]
306
311
pub fn entry ( mut self , key : & fmt:: Debug , value : & fmt:: Debug ) -> DebugMap < ' a , ' b > {
307
312
self . result = self . result . and_then ( |_| {
308
313
if self . is_pretty ( ) {
@@ -321,7 +326,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> {
321
326
322
327
/// Consumes the `DebugMap`, finishing output and returning any error
323
328
/// encountered.
324
- #[ unstable ( feature = "debug_builders" , reason = "method was just created " ) ]
329
+ #[ stable ( feature = "debug_builders" , since = "1.1.0 " ) ]
325
330
pub fn finish ( self ) -> fmt:: Result {
326
331
let prefix = if self . is_pretty ( ) && self . has_fields { "\n " } else { "" } ;
327
332
self . result . and_then ( |_| write ! ( self . fmt, "{}}}" , prefix) )
0 commit comments