Skip to content

Commit 9912d5c

Browse files
authored
Rollup merge of rust-lang#124049 - slanterns:const_io_structs_stabilize, r=jhpratt
Stabilize `const_io_structs` This PR stabilizes `const_io_structs`. Tracking issue: rust-lang#78812. Implementation PR: rust-lang#78811. FCPs already completed in the tracking issue. Closes rust-lang#78812. ``@rustbot`` label: +T-libs-api r? libs-api
2 parents ad33bc8 + b7f4332 commit 9912d5c

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

library/std/src/io/cursor.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl<T> Cursor<T> {
9595
/// # force_inference(&buff);
9696
/// ```
9797
#[stable(feature = "rust1", since = "1.0.0")]
98-
#[rustc_const_unstable(feature = "const_io_structs", issue = "78812")]
98+
#[rustc_const_stable(feature = "const_io_structs", since = "CURRENT_RUSTC_VERSION")]
9999
pub const fn new(inner: T) -> Cursor<T> {
100100
Cursor { pos: 0, inner }
101101
}
@@ -132,7 +132,7 @@ impl<T> Cursor<T> {
132132
/// let reference = buff.get_ref();
133133
/// ```
134134
#[stable(feature = "rust1", since = "1.0.0")]
135-
#[rustc_const_unstable(feature = "const_io_structs", issue = "78812")]
135+
#[rustc_const_stable(feature = "const_io_structs", since = "CURRENT_RUSTC_VERSION")]
136136
pub const fn get_ref(&self) -> &T {
137137
&self.inner
138138
}
@@ -178,7 +178,7 @@ impl<T> Cursor<T> {
178178
/// assert_eq!(buff.position(), 1);
179179
/// ```
180180
#[stable(feature = "rust1", since = "1.0.0")]
181-
#[rustc_const_unstable(feature = "const_io_structs", issue = "78812")]
181+
#[rustc_const_stable(feature = "const_io_structs", since = "CURRENT_RUSTC_VERSION")]
182182
pub const fn position(&self) -> u64 {
183183
self.pos
184184
}

library/std/src/io/util.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub struct Empty;
5151
/// ```
5252
#[must_use]
5353
#[stable(feature = "rust1", since = "1.0.0")]
54-
#[rustc_const_unstable(feature = "const_io_structs", issue = "78812")]
54+
#[rustc_const_stable(feature = "const_io_structs", since = "CURRENT_RUSTC_VERSION")]
5555
pub const fn empty() -> Empty {
5656
Empty
5757
}
@@ -173,7 +173,7 @@ pub struct Repeat {
173173
/// ```
174174
#[must_use]
175175
#[stable(feature = "rust1", since = "1.0.0")]
176-
#[rustc_const_unstable(feature = "const_io_structs", issue = "78812")]
176+
#[rustc_const_stable(feature = "const_io_structs", since = "CURRENT_RUSTC_VERSION")]
177177
pub const fn repeat(byte: u8) -> Repeat {
178178
Repeat { byte }
179179
}
@@ -276,7 +276,7 @@ pub struct Sink;
276276
/// ```
277277
#[must_use]
278278
#[stable(feature = "rust1", since = "1.0.0")]
279-
#[rustc_const_unstable(feature = "const_io_structs", issue = "78812")]
279+
#[rustc_const_stable(feature = "const_io_structs", since = "CURRENT_RUSTC_VERSION")]
280280
pub const fn sink() -> Sink {
281281
Sink
282282
}

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@
407407
// tidy-alphabetical-start
408408
#![feature(const_collections_with_hasher)]
409409
#![feature(const_hash)]
410-
#![feature(const_io_structs)]
411410
#![feature(const_ip)]
412411
#![feature(const_ipv4)]
413412
#![feature(const_ipv6)]

0 commit comments

Comments
 (0)