Stabilise 'Cursor::{get_mut, set_position}' in 'const' scenarios;
This commit is contained in:
parent
59588250ad
commit
4500ed5256
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue