about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-30 06:49:33 +0000
committerbors <bors@rust-lang.org>2018-03-30 06:49:33 +0000
commit696076144d4d904cc99c02f85cf46bbe52404657 (patch)
treeac383afd82812183c489a8f84e33d90d57a8897d /src/libstd
parentd8a1bc73f742d5c1e747270bdc8b5a6e97ba3bb1 (diff)
parent0600d0f38d4998f1cacb3b97408224a0ee350db4 (diff)
downloadrust-696076144d4d904cc99c02f85cf46bbe52404657.tar.gz
rust-696076144d4d904cc99c02f85cf46bbe52404657.zip
Auto merge of #49422 - mbrubeck:fs_read, r=TimNN
Stabilize fs::read and fs::write

As discussed in https://github.com/rust-lang/rust/issues/46588#issuecomment-373956283
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fs.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index 27004f9766c..3f0acfeea22 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -251,8 +251,6 @@ fn initial_buffer_size(file: &File) -> usize {
 /// # Examples
 ///
 /// ```no_run
-/// #![feature(fs_read_write)]
-///
 /// use std::fs;
 /// use std::net::SocketAddr;
 ///
@@ -261,7 +259,7 @@ fn initial_buffer_size(file: &File) -> usize {
 ///     Ok(())
 /// }
 /// ```
-#[unstable(feature = "fs_read_write", issue = "46588")]
+#[stable(feature = "fs_read_write_bytes", since = "1.27.0")]
 pub fn read<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
     let mut file = File::open(path)?;
     let mut bytes = Vec::with_capacity(initial_buffer_size(&file));
@@ -325,8 +323,6 @@ pub fn read_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
 /// # Examples
 ///
 /// ```no_run
-/// #![feature(fs_read_write)]
-///
 /// use std::fs;
 ///
 /// fn main() -> std::io::Result<()> {
@@ -334,7 +330,7 @@ pub fn read_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
 ///     Ok(())
 /// }
 /// ```
-#[unstable(feature = "fs_read_write", issue = "46588")]
+#[stable(feature = "fs_read_write_bytes", since = "1.27.0")]
 pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result<()> {
     File::create(path)?.write_all(contents.as_ref())
 }