Skip to content

Commit 14e95f2

Browse files
committed
Setup alloc::io
1 parent 01df53d commit 14e95f2

5 files changed

Lines changed: 24 additions & 2 deletions

File tree

library/alloc/src/io/error.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#[unstable(feature = "alloc_io", issue = "154046")]
2+
pub use core::io::ErrorKind;
3+
#[unstable(feature = "raw_os_error_ty", issue = "107792")]
4+
pub use core::io::RawOsError;

library/alloc/src/io/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//! Traits, helpers, and type definitions for core I/O functionality.
2+
3+
mod error;
4+
5+
#[unstable(feature = "core_io_borrowed_buf", issue = "117693")]
6+
pub use core::io::{BorrowedBuf, BorrowedCursor};
7+
8+
#[unstable(feature = "alloc_io", issue = "154046")]
9+
pub use self::error::ErrorKind;
10+
#[unstable(feature = "raw_os_error_ty", issue = "107792")]
11+
pub use self::error::RawOsError;

library/alloc/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@
111111
#![feature(const_try)]
112112
#![feature(copied_into_inner)]
113113
#![feature(core_intrinsics)]
114+
#![feature(core_io)]
115+
#![feature(core_io_borrowed_buf)]
116+
#![feature(core_io_internals)]
114117
#![feature(deprecated_suggestion)]
115118
#![feature(deref_pure_trait)]
116119
#![feature(diagnostic_on_move)]
@@ -141,6 +144,7 @@
141144
#![feature(ptr_alignment_type)]
142145
#![feature(ptr_internals)]
143146
#![feature(ptr_metadata)]
147+
#![feature(raw_os_error_ty)]
144148
#![feature(rev_into_inner)]
145149
#![feature(set_ptr_value)]
146150
#![feature(sized_type_properties)]
@@ -228,6 +232,8 @@ pub mod collections;
228232
pub mod ffi;
229233
pub mod fmt;
230234
pub mod intrinsics;
235+
#[unstable(feature = "alloc_io", issue = "154046")]
236+
pub mod io;
231237
#[cfg(not(no_rc))]
232238
pub mod rc;
233239
pub mod slice;

library/std/src/io/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
mod tests;
33

44
#[stable(feature = "rust1", since = "1.0.0")]
5-
pub use core::io::ErrorKind;
5+
pub use alloc_crate::io::ErrorKind;
66
#[unstable(feature = "raw_os_error_ty", issue = "107792")]
7-
pub use core::io::RawOsError;
7+
pub use alloc_crate::io::RawOsError;
88

99
// On 64-bit platforms, `io::Error` may use a bit-packed representation to
1010
// reduce size. However, this representation assumes that error codes are

library/std/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@
380380
//
381381
// Library features (alloc):
382382
// tidy-alphabetical-start
383+
#![feature(alloc_io)]
383384
#![feature(allocator_api)]
384385
#![feature(clone_from_ref)]
385386
#![feature(get_mut_unchecked)]

0 commit comments

Comments
 (0)