about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2018-03-27 10:20:27 -0700
committerMatt Brubeck <mbrubeck@limpet.net>2018-03-28 07:43:11 -0700
commit0600d0f38d4998f1cacb3b97408224a0ee350db4 (patch)
tree671c305c4024378fcb616418e96e805ce6cdb358
parent3efe61c825e1d49dc6febeb252954b9532c0c677 (diff)
downloadrust-0600d0f38d4998f1cacb3b97408224a0ee350db4.tar.gz
rust-0600d0f38d4998f1cacb3b97408224a0ee350db4.zip
Stabilize fs::read and fs::write
-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 5caa703ee97..b5476e9326d 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 foo() -> 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())
 }