Replace version placeholders with 1.73.0

This commit is contained in:
Mark Rousskov
2023-08-21 09:12:15 -04:00
parent 95305899b8
commit c8522adb97
12 changed files with 35 additions and 35 deletions

View File

@@ -325,7 +325,7 @@ impl<T: 'static> LocalKey<Cell<T>> {
///
/// assert_eq!(X.get(), 123);
/// ```
#[stable(feature = "local_key_cell_methods", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "local_key_cell_methods", since = "1.73.0")]
pub fn set(&'static self, value: T) {
self.initialize_with(Cell::new(value), |value, cell| {
if let Some(value) = value {
@@ -358,7 +358,7 @@ impl<T: 'static> LocalKey<Cell<T>> {
///
/// assert_eq!(X.get(), 1);
/// ```
#[stable(feature = "local_key_cell_methods", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "local_key_cell_methods", since = "1.73.0")]
pub fn get(&'static self) -> T
where
T: Copy,
@@ -388,7 +388,7 @@ impl<T: 'static> LocalKey<Cell<T>> {
/// assert_eq!(X.take(), Some(1));
/// assert_eq!(X.take(), None);
/// ```
#[stable(feature = "local_key_cell_methods", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "local_key_cell_methods", since = "1.73.0")]
pub fn take(&'static self) -> T
where
T: Default,
@@ -418,7 +418,7 @@ impl<T: 'static> LocalKey<Cell<T>> {
/// assert_eq!(X.replace(2), 1);
/// assert_eq!(X.replace(3), 2);
/// ```
#[stable(feature = "local_key_cell_methods", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "local_key_cell_methods", since = "1.73.0")]
pub fn replace(&'static self, value: T) -> T {
self.with(|cell| cell.replace(value))
}
@@ -448,7 +448,7 @@ impl<T: 'static> LocalKey<RefCell<T>> {
///
/// X.with_borrow(|v| assert!(v.is_empty()));
/// ```
#[stable(feature = "local_key_cell_methods", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "local_key_cell_methods", since = "1.73.0")]
pub fn with_borrow<F, R>(&'static self, f: F) -> R
where
F: FnOnce(&T) -> R,
@@ -481,7 +481,7 @@ impl<T: 'static> LocalKey<RefCell<T>> {
///
/// X.with_borrow(|v| assert_eq!(*v, vec![1]));
/// ```
#[stable(feature = "local_key_cell_methods", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "local_key_cell_methods", since = "1.73.0")]
pub fn with_borrow_mut<F, R>(&'static self, f: F) -> R
where
F: FnOnce(&mut T) -> R,
@@ -517,7 +517,7 @@ impl<T: 'static> LocalKey<RefCell<T>> {
///
/// X.with_borrow(|v| assert_eq!(*v, vec![1, 2, 3]));
/// ```
#[stable(feature = "local_key_cell_methods", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "local_key_cell_methods", since = "1.73.0")]
pub fn set(&'static self, value: T) {
self.initialize_with(RefCell::new(value), |value, cell| {
if let Some(value) = value {
@@ -558,7 +558,7 @@ impl<T: 'static> LocalKey<RefCell<T>> {
///
/// X.with_borrow(|v| assert!(v.is_empty()));
/// ```
#[stable(feature = "local_key_cell_methods", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "local_key_cell_methods", since = "1.73.0")]
pub fn take(&'static self) -> T
where
T: Default,
@@ -589,7 +589,7 @@ impl<T: 'static> LocalKey<RefCell<T>> {
///
/// X.with_borrow(|v| assert_eq!(*v, vec![1, 2, 3]));
/// ```
#[stable(feature = "local_key_cell_methods", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "local_key_cell_methods", since = "1.73.0")]
pub fn replace(&'static self, value: T) -> T {
self.with(|cell| cell.replace(value))
}