From 7c7feea9f82a24a3101476da73d7ecbb0a3106e5 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Wed, 3 Jul 2024 19:57:13 +0000 Subject: [PATCH] Add clarification from nikomatsakis Niko requested this clarification about whether "happens inside an `UnsafeCell` meant "happens to bytes inside of an `UnsafeCell`", so let's go ahead and just add that language to the text. --- src/items/external-blocks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/items/external-blocks.md b/src/items/external-blocks.md index 95d16d6ce..8e1aa2fcd 100644 --- a/src/items/external-blocks.md +++ b/src/items/external-blocks.md @@ -57,7 +57,7 @@ Extern statics can be either immutable or mutable just like [statics] outside of An immutable static *must* be initialized before any Rust code is executed. It is not enough for the static to be initialized before Rust code reads from it. Once Rust code runs, mutating an immutable static (from inside or outside Rust) is UB, -except if the mutation happens inside an `UnsafeCell`. +except if the mutation happens to bytes inside of an `UnsafeCell`. ## ABI