Skip to content

Commit

Permalink
Unrolled build for rust-lang#119153
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#119153 - rursprung:stabilize-file_create_new, r=dtolnay

stabilize `file_create_new`

closes rust-lang#105135
  • Loading branch information
rust-timer committed Dec 23, 2023
2 parents 520e30b + 62d5321 commit 9b21d24
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions library/std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,6 @@ impl File {
/// # Examples
///
/// ```no_run
/// #![feature(file_create_new)]
///
/// use std::fs::File;
/// use std::io::Write;
///
Expand All @@ -422,7 +420,7 @@ impl File {
/// Ok(())
/// }
/// ```
#[unstable(feature = "file_create_new", issue = "105135")]
#[stable(feature = "file_create_new", since = "CURRENT_RUSTC_VERSION")]
pub fn create_new<P: AsRef<Path>>(path: P) -> io::Result<File> {
OpenOptions::new().read(true).write(true).create_new(true).open(path.as_ref())
}
Expand Down

0 comments on commit 9b21d24

Please sign in to comment.