File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,19 @@ This book does not try to:
2121- Introduce new unsafe constructs in Rust (only raise awareness of their absence).
2222- Formalize unsafe and therefore Rust's type system.
2323
24+ ## Limitations
25+
26+ This book has limited usage for a few reasons:
27+ - If you care about correctness as much as soundness, then it is unnecessary and redundant to prove
28+ soundness, since correctness implies soundness. A similar (and simpler) mental model works for
29+ correctness, without the concepts of ` unsafe ` and ` robust ` .
30+ - The mental model reduces the scope of unsafe to the expression level. This might be too granular
31+ for practical purposes (which is why it's a mental model and not a formal tool). Most often, being
32+ modular at function level is enough, in which case the more usual ` requires ` and ` ensures `
33+ contract style is enough. (Note that requirements may talk about what happens after the function
34+ returns, which is less surprising in the mental model because it follows a type as contract
35+ style.)
36+
2437## Living document
2538
2639This book is imperfect. Feel free to [ open an issue] [ new-issue ] if something is unclear or wrong.
You can’t perform that action at this time.
0 commit comments