Skip to content

Commit

Permalink
docs: rust - unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan4yin committed Sep 17, 2024
1 parent 1a03901 commit 7e386b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pl/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ Unsafe 的 5 项特殊能力:
> 注意:unsafe 代码块仍然会被借用检查器与其他 Rust 安全策略检查,unsafe 只是使你可以使用上述 5 项特
> 殊能力,但 unsafe 代码仍旧需要遵守 Rust 的安全规则。
最佳实践:

- 尽可能只在必要的时候使用 unsafe,使 unsafe 代码尽可能地少。在排查内存安全问题时你会感谢这个决定。

## 宏 - macro

待续
Expand Down

0 comments on commit 7e386b0

Please sign in to comment.