summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2023-05-17 11:13:57 +0530
committerGitHub <noreply@github.com>2023-05-17 11:13:57 +0530
commit71fdb95272ba1155cb0eacd7053d0eec18f1dab1 (patch)
tree01605ebd761c6be436aa22b5944619ab17da392e /compiler/rustc_span/src
parentbc3b94a486cb2bea32f3d07bd6cab76fae95d35f (diff)
parentffacb8861a860e5797e2835668336e60147ef454 (diff)
downloadrust-71fdb95272ba1155cb0eacd7053d0eec18f1dab1.tar.gz
rust-71fdb95272ba1155cb0eacd7053d0eec18f1dab1.zip
Rollup merge of #111654 - JoJoJet:unsafe-cell-from-mut-lib, r=joshtriplett
Add a conversion from `&mut T` to `&mut UnsafeCell<T>`

Provides a safe way of downgrading an exclusive reference into an alias-able `&UnsafeCell<T>` reference.

ACP: https://github.com/rust-lang/libs-team/issues/198.
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/symbol.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index e43eddd8e6b..874d578fe1d 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -1584,6 +1584,7 @@ symbols! {
         unrestricted_attribute_tokens,
         unsafe_block_in_unsafe_fn,
         unsafe_cell,
+        unsafe_cell_from_mut,
         unsafe_no_drop_flag,
         unsafe_pin_internals,
         unsize,