未验证 提交 5eb77838 编写于 作者: G Guillaume Gomez 提交者: GitHub

Rollup merge of #88722 - WaffleLapkin:unsafe_cell_const_get_mut, r=dtolnay

Make `UnsafeCell::get_mut` const
......@@ -1916,7 +1916,8 @@ pub const fn get(&self) -> *mut T {
/// ```
#[inline(always)]
#[stable(feature = "unsafe_cell_get_mut", since = "1.50.0")]
pub fn get_mut(&mut self) -> &mut T {
#[rustc_const_unstable(feature = "const_unsafecell_get_mut", issue = "88836")]
pub const fn get_mut(&mut self) -> &mut T {
&mut self.value
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册