Update library functions with stability attributes

This may not be strictly minimal, but all unstable functions also need a
`rustc_const_unstable` attribute.
This commit is contained in:
Dylan MacKenzie
2020-09-17 11:02:56 -07:00
parent 3dd28c78c3
commit 110e59e70e
13 changed files with 22 additions and 0 deletions

View File

@@ -225,6 +225,7 @@ impl<T: 'static> LocalKey<T> {
reason = "recently added to create a key",
issue = "none"
)]
#[rustc_const_unstable(feature = "thread_local_internals", issue = "none")]
pub const unsafe fn new(inner: unsafe fn() -> Option<&'static T>) -> LocalKey<T> {
LocalKey { inner }
}
@@ -497,6 +498,7 @@ pub mod os {
}
impl<T: 'static> Key<T> {
#[rustc_const_unstable(feature = "thread_local_internals", issue = "none")]
pub const fn new() -> Key<T> {
Key { os: OsStaticKey::new(Some(destroy_value::<T>)), marker: marker::PhantomData }
}