]> git.lizzy.rs Git - rust.git/commitdiff
std: Stabilize the `once_new` feature
authorAlex Crichton <alex@alexcrichton.com>
Thu, 11 Jun 2015 01:44:11 +0000 (18:44 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 17 Jun 2015 16:07:16 +0000 (09:07 -0700)
This function follows the well-established "constructor" pattern and the
initialization constant will likely be deprecated in favor of it once `const_fn`
is stabilized.

src/libstd/sync/once.rs

index 1e0aa271b4dcd9572f73173c6090f57804160115..0bda6a975a2445a95ea64ced9254297812f166b0 100644 (file)
@@ -48,7 +48,7 @@ pub struct Once {
 
 impl Once {
     /// Creates a new `Once` value.
-    #[unstable(feature = "once_new")]
+    #[stable(feature = "once_new", since = "1.2.0")]
     pub const fn new() -> Once {
         Once {
             mutex: StaticMutex::new(),