Skip to content

Commit

Permalink
Update what-unsafe-does.md (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzwxh authored Oct 25, 2023
1 parent 974939e commit eebdde9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/what-unsafe-does.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
与 C 语言不同,Rust 中的“未定义行为”的范围相当有限。核心语言中,你只需要关心防止以下事情:

- 解除引用(使用`*`运算符)悬空或不对齐的指针(见下文)
- 破坏[指名针别规则][pointer aliasing rules]
- 破坏[指针别名规则][pointer aliasing rules]
- 调用一个 ABI 错误的函数,或者从一个 unwind ABI 错误的函数中 unwinding
- 引起[数据竞争][race]
- 执行用当前执行线程不支持的[目标特性][target features]编译的代码
Expand Down

0 comments on commit eebdde9

Please sign in to comment.