Skip to content

Commit

Permalink
Add clarification from nikomatsakis
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
traviscross committed Jul 3, 2024
1 parent 1cab014 commit 7c7feea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/items/external-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7c7feea

Please sign in to comment.