Skip to content

Commit

Permalink
Stabilise 'Cursor::{get_mut, set_position}' in 'const' scenarios;
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernager authored and gitbot committed Feb 20, 2025
1 parent f737e2e commit f1b58f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions std/src/io/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit f1b58f1

Please sign in to comment.