File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
## Behavior considered undefined
2
2
3
- Rust code, including within ` unsafe ` blocks and ` unsafe ` functions is incorrect
4
- if it exhibits any of the behaviors in the following list. It is the
5
- programmer's responsibility when writing ` unsafe ` code that it is not possible
6
- to let ` safe ` code exhibit these behaviors.
3
+ Rust code is incorrect if it exhibits any of the behaviors in the following
4
+ list. This includes code within ` unsafe ` blocks and ` unsafe ` functions!
5
+ ` unsafe ` is not an excuse to cause undefined behavior.
6
+
7
+ It is the programmer's responsibility when writing ` unsafe ` code that it is not
8
+ possible to let ` safe ` code exhibit these behaviors. ` unsafe ` code that
9
+ satisfies this property for any ` safe ` client is called * sound* ; if ` unsafe `
10
+ code can be misused by ` safe ` code to exhibit undefined behavior, it is
11
+ * unsound* .
7
12
8
13
<div class =" warning " >
9
14
You can’t perform that action at this time.
0 commit comments