Skip to content

Commit

Permalink
Tweak wording in header about unsafe extern
Browse files Browse the repository at this point in the history
Since we're adding `unsafe extern` in this release, saying "safe items
with unsafe extern" rather than "safe items in unsafe extern" here
sounds more right to my ear.
  • Loading branch information
traviscross committed Oct 17, 2024
1 parent 8970b99 commit 2b4aef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posts/2024-10-17-Rust-1.82.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ fn main() {

The native syntax makes it more clear that the operand expression of these operators is interpreted as a [place expression](https://www.ralfj.de/blog/2024/08/14/places.html). It also avoids the term "address-of" when referring to the action of creating a pointer. A pointer is [more than just an address](https://rust-lang.github.io/rfcs/3559-rust-has-provenance.html), so Rust is moving away from terms like "address-of" that reaffirm a false equivalence of pointers and addresses.

### Safe items in `unsafe extern`
### Safe items with `unsafe extern`

Rust code can use functions and statics from foreign code. The type signatures of these foreign items are provided in `extern` blocks. Historically, all items within `extern` blocks have been unsafe to call, but we didn't have to write `unsafe` anywhere on the `extern` block itself.

Expand Down

0 comments on commit 2b4aef0

Please sign in to comment.