@@ -1210,13 +1210,12 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> {
12101210 }
12111211}
12121212
1213- /// Creates a type whose [`fmt::Debug`] and [`fmt::Display`] impls are provided with the function
1214- /// `f` .
1213+ /// Creates a type whose [`fmt::Debug`] and [`fmt::Display`] impls are
1214+ /// forwarded to the provided closure .
12151215///
12161216/// # Examples
12171217///
12181218/// ```
1219- /// #![feature(debug_closure_helpers)]
12201219/// use std::fmt;
12211220///
12221221/// let value = 'a';
@@ -1227,21 +1226,19 @@ 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" ]
12321231pub fn from_fn < F : Fn ( & mut fmt:: Formatter < ' _ > ) -> fmt:: Result > ( f : F ) -> FromFn < F > {
12331232 FromFn ( f)
12341233}
12351234
1236- /// Implements [`fmt::Debug`] and [`fmt::Display`] using a function .
1235+ /// Implements [`fmt::Debug`] and [`fmt::Display`] via the provided closure .
12371236///
12381237/// Created with [`from_fn`].
1239- #[ unstable( feature = "debug_closure_helpers" , issue = "117729" ) ]
1240- pub struct FromFn < F > ( F )
1241- where
1242- F : Fn ( & mut fmt:: Formatter < ' _ > ) -> fmt:: Result ;
1238+ #[ stable( feature = "fmt_from_fn" , since = "CURRENT_RUSTC_VERSION" ) ]
1239+ pub struct FromFn < F > ( F ) ;
12431240
1244- #[ unstable ( feature = "debug_closure_helpers " , issue = "117729 " ) ]
1241+ #[ stable ( feature = "fmt_from_fn " , since = "CURRENT_RUSTC_VERSION " ) ]
12451242impl < F > fmt:: Debug for FromFn < F >
12461243where
12471244 F : Fn ( & mut fmt:: Formatter < ' _ > ) -> fmt:: Result ,
@@ -1251,7 +1248,7 @@ where
12511248 }
12521249}
12531250
1254- #[ unstable ( feature = "debug_closure_helpers " , issue = "117729 " ) ]
1251+ #[ stable ( feature = "fmt_from_fn " , since = "CURRENT_RUSTC_VERSION " ) ]
12551252impl < F > fmt:: Display for FromFn < F >
12561253where
12571254 F : Fn ( & mut fmt:: Formatter < ' _ > ) -> fmt:: Result ,
0 commit comments