Skip to content

Commit df26a5a

Browse files
committed
Stabilize std::os::*::fs::FileExt
1 parent 95373cd commit df26a5a

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/libstd/sys/unix/ext/fs.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use sys_common::{FromInner, AsInner, AsInnerMut};
2121
use sys::platform::fs::MetadataExt as UnixMetadataExt;
2222

2323
/// Unix-specific extensions to `File`
24-
#[unstable(feature = "file_offset", issue = "35918")]
24+
#[stable(feature = "file_offset", since = "1.15.0")]
2525
pub trait FileExt {
2626
/// Reads a number of bytes starting from a given offset.
2727
///
@@ -34,7 +34,7 @@ pub trait FileExt {
3434
///
3535
/// Note that similar to `File::read`, it is not an error to return with a
3636
/// short read.
37-
#[unstable(feature = "file_offset", issue = "35918")]
37+
#[stable(feature = "file_offset", since = "1.15.0")]
3838
fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result<usize>;
3939

4040
/// Writes a number of bytes starting from a given offset.
@@ -51,11 +51,11 @@ pub trait FileExt {
5151
///
5252
/// Note that similar to `File::write`, it is not an error to return a
5353
/// short write.
54-
#[unstable(feature = "file_offset", issue = "35918")]
54+
#[stable(feature = "file_offset", since = "1.15.0")]
5555
fn write_at(&self, buf: &[u8], offset: u64) -> io::Result<usize>;
5656
}
5757

58-
#[unstable(feature = "file_offset", issue = "35918")]
58+
#[stable(feature = "file_offset", since = "1.15.0")]
5959
impl FileExt for fs::File {
6060
fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result<usize> {
6161
self.as_inner().read_at(buf, offset)

src/libstd/sys/unix/ext/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub mod prelude {
5050
pub use super::fs::{PermissionsExt, OpenOptionsExt, MetadataExt, FileTypeExt};
5151
#[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")]
5252
pub use super::fs::DirEntryExt;
53-
#[doc(no_inline)] #[unstable(feature = "file_offset", issue = "35918")]
53+
#[doc(no_inline)] #[stable(feature = "file_offset", since = "1.15.0")]
5454
pub use super::fs::FileExt;
5555
#[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")]
5656
pub use super::thread::JoinHandleExt;

src/libstd/sys/windows/ext/fs.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use sys;
1919
use sys_common::{AsInnerMut, AsInner};
2020

2121
/// Windows-specific extensions to `File`
22-
#[unstable(feature = "file_offset", issue = "35918")]
22+
#[stable(feature = "file_offset", since = "1.15.0")]
2323
pub trait FileExt {
2424
/// Seeks to a given position and reads a number of bytes.
2525
///
@@ -35,7 +35,7 @@ pub trait FileExt {
3535
/// Note that similar to `File::read`, it is not an error to return with a
3636
/// short read. When returning from such a short read, the file pointer is
3737
/// still updated.
38-
#[unstable(feature = "file_offset", issue = "35918")]
38+
#[stable(feature = "file_offset", since = "1.15.0")]
3939
fn seek_read(&self, buf: &mut [u8], offset: u64) -> io::Result<usize>;
4040

4141
/// Seeks to a given position and writes a number of bytes.
@@ -52,11 +52,11 @@ pub trait FileExt {
5252
/// Note that similar to `File::write`, it is not an error to return a
5353
/// short write. When returning from such a short write, the file pointer
5454
/// is still updated.
55-
#[unstable(feature = "file_offset", issue = "35918")]
55+
#[stable(feature = "file_offset", since = "1.15.0")]
5656
fn seek_write(&self, buf: &[u8], offset: u64) -> io::Result<usize>;
5757
}
5858

59-
#[unstable(feature = "file_offset", issue = "35918")]
59+
#[stable(feature = "file_offset", since = "1.15.0")]
6060
impl FileExt for fs::File {
6161
fn seek_read(&self, buf: &mut [u8], offset: u64) -> io::Result<usize> {
6262
self.as_inner().read_at(buf, offset)

src/libstd/sys/windows/ext/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ pub mod prelude {
3636
pub use super::ffi::{OsStrExt, OsStringExt};
3737
#[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")]
3838
pub use super::fs::{OpenOptionsExt, MetadataExt};
39-
#[doc(no_inline)] #[unstable(feature = "file_offset", issue = "35918")]
39+
#[doc(no_inline)] #[stable(feature = "file_offset", since = "1.15.0")]
4040
pub use super::fs::FileExt;
4141
}

0 commit comments

Comments
 (0)