Skip to content

Commit

Permalink
Add tracking issue number for local_key_cell_methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Mar 5, 2022
1 parent 88a693c commit 93c409d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions library/std/src/thread/local.rs
Expand Up @@ -482,7 +482,7 @@ impl<T: 'static> LocalKey<Cell<T>> {
///
/// assert_eq!(X.get(), 123);
/// ```
#[unstable(feature = "local_key_cell_methods", issue = "none")]
#[unstable(feature = "local_key_cell_methods", issue = "92122")]
pub fn set(&'static self, value: T) {
self.initialize_with(Cell::new(value), |init, cell| {
if let Some(init) = init {
Expand Down Expand Up @@ -513,7 +513,7 @@ impl<T: 'static> LocalKey<Cell<T>> {
///
/// assert_eq!(X.get(), 1);
/// ```
#[unstable(feature = "local_key_cell_methods", issue = "none")]
#[unstable(feature = "local_key_cell_methods", issue = "92122")]
pub fn get(&'static self) -> T
where
T: Copy,
Expand Down Expand Up @@ -544,7 +544,7 @@ impl<T: 'static> LocalKey<Cell<T>> {
/// assert_eq!(X.take(), Some(1));
/// assert_eq!(X.take(), None);
/// ```
#[unstable(feature = "local_key_cell_methods", issue = "none")]
#[unstable(feature = "local_key_cell_methods", issue = "92122")]
pub fn take(&'static self) -> T
where
T: Default,
Expand Down Expand Up @@ -575,7 +575,7 @@ impl<T: 'static> LocalKey<Cell<T>> {
/// assert_eq!(X.replace(2), 1);
/// assert_eq!(X.replace(3), 2);
/// ```
#[unstable(feature = "local_key_cell_methods", issue = "none")]
#[unstable(feature = "local_key_cell_methods", issue = "92122")]
pub fn replace(&'static self, value: T) -> T {
self.with(|cell| cell.replace(value))
}
Expand Down Expand Up @@ -606,7 +606,7 @@ impl<T: 'static> LocalKey<RefCell<T>> {
///
/// X.with_borrow(|v| assert!(v.is_empty()));
/// ```
#[unstable(feature = "local_key_cell_methods", issue = "none")]
#[unstable(feature = "local_key_cell_methods", issue = "92122")]
pub fn with_borrow<F, R>(&'static self, f: F) -> R
where
F: FnOnce(&T) -> R,
Expand Down Expand Up @@ -640,7 +640,7 @@ impl<T: 'static> LocalKey<RefCell<T>> {
///
/// X.with_borrow(|v| assert_eq!(*v, vec![1]));
/// ```
#[unstable(feature = "local_key_cell_methods", issue = "none")]
#[unstable(feature = "local_key_cell_methods", issue = "92122")]
pub fn with_borrow_mut<F, R>(&'static self, f: F) -> R
where
F: FnOnce(&mut T) -> R,
Expand Down Expand Up @@ -675,7 +675,7 @@ impl<T: 'static> LocalKey<RefCell<T>> {
///
/// X.with_borrow(|v| assert_eq!(*v, vec![1, 2, 3]));
/// ```
#[unstable(feature = "local_key_cell_methods", issue = "none")]
#[unstable(feature = "local_key_cell_methods", issue = "92122")]
pub fn set(&'static self, value: T) {
self.initialize_with(RefCell::new(value), |init, cell| {
if let Some(init) = init {
Expand Down Expand Up @@ -714,7 +714,7 @@ impl<T: 'static> LocalKey<RefCell<T>> {
///
/// X.with_borrow(|v| assert!(v.is_empty()));
/// ```
#[unstable(feature = "local_key_cell_methods", issue = "none")]
#[unstable(feature = "local_key_cell_methods", issue = "92122")]
pub fn take(&'static self) -> T
where
T: Default,
Expand Down Expand Up @@ -746,7 +746,7 @@ impl<T: 'static> LocalKey<RefCell<T>> {
///
/// X.with_borrow(|v| assert_eq!(*v, vec![1, 2, 3]));
/// ```
#[unstable(feature = "local_key_cell_methods", issue = "none")]
#[unstable(feature = "local_key_cell_methods", issue = "92122")]
pub fn replace(&'static self, value: T) -> T {
self.with(|cell| cell.replace(value))
}
Expand Down

0 comments on commit 93c409d

Please sign in to comment.