Skip to content

Commit

Permalink
Rollup merge of #136794 - cberner:stabilize, r=joshtriplett
Browse files Browse the repository at this point in the history
Stabilize file_lock

Closes #130994
  • Loading branch information
matthiaskrgr authored Feb 19, 2025
2 parents e6406ad + 82af73d commit ce72b8d
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions library/std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// #![feature(file_lock)]
/// use std::fs::File;
///
/// fn main() -> std::io::Result<()> {
Expand All @@ -673,7 +672,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()
}
Expand Down Expand Up @@ -717,7 +716,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// #![feature(file_lock)]
/// use std::fs::File;
///
/// fn main() -> std::io::Result<()> {
Expand All @@ -726,7 +724,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()
}
Expand Down Expand Up @@ -775,7 +773,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// #![feature(file_lock)]
/// use std::fs::File;
///
/// fn main() -> std::io::Result<()> {
Expand All @@ -784,7 +781,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()
}
Expand Down Expand Up @@ -832,7 +829,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// #![feature(file_lock)]
/// use std::fs::File;
///
/// fn main() -> std::io::Result<()> {
Expand All @@ -841,7 +837,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()
}
Expand Down Expand Up @@ -869,7 +865,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// #![feature(file_lock)]
/// use std::fs::File;
///
/// fn main() -> std::io::Result<()> {
Expand All @@ -879,7 +874,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()
}
Expand Down

0 comments on commit ce72b8d

Please sign in to comment.