Stabilize file_lock

This commit is contained in:
Christopher Berner 2025-02-09 13:54:50 -08:00
parent 124cc92199
commit 82af73dd4c

View File

@ -660,7 +660,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// #![feature(file_lock)]
/// use std::fs::File;
///
/// fn main() -> std::io::Result<()> {
@ -669,7 +668,7 @@ impl File {
/// Ok(())
/// }
/// ```
#[unstable(feature = "file_lock", issue = "130994")]
#[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")]
pub fn lock(&self) -> io::Result<()> {
self.inner.lock()
}
@ -708,7 +707,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// #![feature(file_lock)]
/// use std::fs::File;
///
/// fn main() -> std::io::Result<()> {
@ -717,7 +715,7 @@ impl File {
/// Ok(())
/// }
/// ```
#[unstable(feature = "file_lock", issue = "130994")]
#[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")]
pub fn lock_shared(&self) -> io::Result<()> {
self.inner.lock_shared()
}
@ -763,7 +761,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// #![feature(file_lock)]
/// use std::fs::File;
///
/// fn main() -> std::io::Result<()> {
@ -772,7 +769,7 @@ impl File {
/// Ok(())
/// }
/// ```
#[unstable(feature = "file_lock", issue = "130994")]
#[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")]
pub fn try_lock(&self) -> io::Result<bool> {
self.inner.try_lock()
}
@ -815,7 +812,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// #![feature(file_lock)]
/// use std::fs::File;
///
/// fn main() -> std::io::Result<()> {
@ -824,7 +820,7 @@ impl File {
/// Ok(())
/// }
/// ```
#[unstable(feature = "file_lock", issue = "130994")]
#[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")]
pub fn try_lock_shared(&self) -> io::Result<bool> {
self.inner.try_lock_shared()
}
@ -849,7 +845,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// #![feature(file_lock)]
/// use std::fs::File;
///
/// fn main() -> std::io::Result<()> {
@ -859,7 +854,7 @@ impl File {
/// Ok(())
/// }
/// ```
#[unstable(feature = "file_lock", issue = "130994")]
#[stable(feature = "file_lock", since = "CURRENT_RUSTC_VERSION")]
pub fn unlock(&self) -> io::Result<()> {
self.inner.unlock()
}