about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-07 12:02:00 +0100
committerGitHub <noreply@github.com>2025-02-07 12:02:00 +0100
commitd9f95ecd0995893f66287548cd89aa34881c9278 (patch)
tree49b7563ea5aa2a198d1877a874c5a3aa8dff3c85
parent5df99b0bd2fc05087c322d5db4d5a2d37428c888 (diff)
parent4500ed525620707cd5d01ae8ad84dfbcd84c996a (diff)
downloadrust-d9f95ecd0995893f66287548cd89aa34881c9278.tar.gz
rust-d9f95ecd0995893f66287548cd89aa34881c9278.zip
Rollup merge of #136634 - bjoernager:const-mut-cursor, r=m-ou-se
Stabilise `Cursor::{get_mut, set_position}` in `const` scenarios.

Closes: #130801

This PR stabilises the `const_mut_cursor` feature gate.
-rw-r--r--library/std/src/io/cursor.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/io/cursor.rs b/library/std/src/io/cursor.rs
index b2ffeb0f95d..606099c8bc6 100644
--- a/library/std/src/io/cursor.rs
+++ b/library/std/src/io/cursor.rs
@@ -153,7 +153,7 @@ impl<T> Cursor<T> {
     /// let reference = buff.get_mut();
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    #[rustc_const_unstable(feature = "const_mut_cursor", issue = "130801")]
+    #[rustc_const_stable(feature = "const_mut_cursor", since = "CURRENT_RUSTC_VERSION")]
     pub const fn get_mut(&mut self) -> &mut T {
         &mut self.inner
     }
@@ -201,7 +201,7 @@ impl<T> Cursor<T> {
     /// assert_eq!(buff.position(), 4);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    #[rustc_const_unstable(feature = "const_mut_cursor", issue = "130801")]
+    #[rustc_const_stable(feature = "const_mut_cursor", since = "CURRENT_RUSTC_VERSION")]
     pub const fn set_position(&mut self, pos: u64) {
         self.pos = pos;
     }