Skip to content

Commit f4e9fe4

Browse files
committed
Auto merge of rust-lang#132664 - matthiaskrgr:rollup-i27nr7i, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - rust-lang#131261 (Stabilize `UnsafeCell::from_mut`) - rust-lang#131405 (bootstrap/codegen_ssa: ship llvm-strip and use it for -Cstrip) - rust-lang#132077 (Add a new `wide-arithmetic` feature for WebAssembly) - rust-lang#132562 (Remove the `wasm32-wasi` target from rustc) - rust-lang#132660 (Remove unused errs.rs file) Failed merges: - rust-lang#131721 (Add new unstable feature `const_eq_ignore_ascii_case`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents ab6f663 + 2e63cbd commit f4e9fe4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/cell.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -2122,7 +2122,6 @@ impl<T: ?Sized> UnsafeCell<T> {
21222122
/// # Examples
21232123
///
21242124
/// ```
2125-
/// # #![feature(unsafe_cell_from_mut)]
21262125
/// use std::cell::UnsafeCell;
21272126
///
21282127
/// let mut val = 42;
@@ -2132,7 +2131,9 @@ impl<T: ?Sized> UnsafeCell<T> {
21322131
/// assert_eq!(*uc.get_mut(), 41);
21332132
/// ```
21342133
#[inline(always)]
2135-
#[unstable(feature = "unsafe_cell_from_mut", issue = "111645")]
2134+
#[stable(feature = "unsafe_cell_from_mut", since = "CURRENT_RUSTC_VERSION")]
2135+
#[rustc_const_stable(feature = "unsafe_cell_from_mut", since = "CURRENT_RUSTC_VERSION")]
2136+
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
21362137
pub const fn from_mut(value: &mut T) -> &mut UnsafeCell<T> {
21372138
// SAFETY: `UnsafeCell<T>` has the same memory layout as `T` due to #[repr(transparent)].
21382139
unsafe { &mut *(value as *mut T as *mut UnsafeCell<T>) }

0 commit comments

Comments
 (0)