Skip to content

Commit 8537abb

Browse files
committed
Stabilize fmt::{from_fn, FromFn} under feature fmt_from_fn
1 parent 8d72d3e commit 8537abb

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

library/alloc/src/fmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ pub use core::fmt::{DebugAsHex, FormattingOptions, Sign};
602602
pub use core::fmt::{DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple};
603603
#[stable(feature = "rust1", since = "1.0.0")]
604604
pub use core::fmt::{Formatter, Result, Write};
605-
#[unstable(feature = "debug_closure_helpers", issue = "117729")]
605+
#[stable(feature = "fmt_from_fn", since = "CURRENT_RUSTC_VERSION")]
606606
pub use core::fmt::{FromFn, from_fn};
607607
#[stable(feature = "rust1", since = "1.0.0")]
608608
pub use core::fmt::{LowerExp, UpperExp};

library/core/src/fmt/builders.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,6 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> {
12161216
/// # Examples
12171217
///
12181218
/// ```
1219-
/// #![feature(debug_closure_helpers)]
12201219
/// use std::fmt;
12211220
///
12221221
/// let value = 'a';
@@ -1227,7 +1226,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> {
12271226
/// assert_eq!(format!("{}", wrapped), "'a'");
12281227
/// assert_eq!(format!("{:?}", wrapped), "'a'");
12291228
/// ```
1230-
#[unstable(feature = "debug_closure_helpers", issue = "117729")]
1229+
#[stable(feature = "fmt_from_fn", since = "CURRENT_RUSTC_VERSION")]
12311230
#[must_use = "returns a type implementing Debug and Display, which do not have any effects unless they are used"]
12321231
pub fn from_fn<F: Fn(&mut fmt::Formatter<'_>) -> fmt::Result>(f: F) -> FromFn<F> {
12331232
FromFn(f)
@@ -1236,12 +1235,12 @@ pub fn from_fn<F: Fn(&mut fmt::Formatter<'_>) -> fmt::Result>(f: F) -> FromFn<F>
12361235
/// Implements [`fmt::Debug`] and [`fmt::Display`] using a function.
12371236
///
12381237
/// Created with [`from_fn`].
1239-
#[unstable(feature = "debug_closure_helpers", issue = "117729")]
1238+
#[stable(feature = "fmt_from_fn", since = "CURRENT_RUSTC_VERSION")]
12401239
pub struct FromFn<F>(F)
12411240
where
12421241
F: Fn(&mut fmt::Formatter<'_>) -> fmt::Result;
12431242

1244-
#[unstable(feature = "debug_closure_helpers", issue = "117729")]
1243+
#[stable(feature = "fmt_from_fn", since = "CURRENT_RUSTC_VERSION")]
12451244
impl<F> fmt::Debug for FromFn<F>
12461245
where
12471246
F: Fn(&mut fmt::Formatter<'_>) -> fmt::Result,
@@ -1251,7 +1250,7 @@ where
12511250
}
12521251
}
12531252

1254-
#[unstable(feature = "debug_closure_helpers", issue = "117729")]
1253+
#[stable(feature = "fmt_from_fn", since = "CURRENT_RUSTC_VERSION")]
12551254
impl<F> fmt::Display for FromFn<F>
12561255
where
12571256
F: Fn(&mut fmt::Formatter<'_>) -> fmt::Result,

library/core/src/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub use num_buffer::{NumBuffer, NumBufferTrait};
3939

4040
#[stable(feature = "debug_builders", since = "1.2.0")]
4141
pub use self::builders::{DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple};
42-
#[unstable(feature = "debug_closure_helpers", issue = "117729")]
42+
#[stable(feature = "fmt_from_fn", since = "CURRENT_RUSTC_VERSION")]
4343
pub use self::builders::{FromFn, from_fn};
4444

4545
/// The type returned by formatter methods.

0 commit comments

Comments
 (0)