6unsafe fn f() { return; } // This is the unsafe code
7
8▶fn main() {
9 f(); // error: call to unsafe function requires unsafe function or block
10}
· · ·
9▶ f(); // error: call to unsafe function requires unsafe function or block
10}
11```
· · ·
12
13▶Using unsafe functionality is potentially dangerous and disallowed by safety
14checks. Examples:
15
· · ·
16* Dereferencing raw pointers
17▶* Calling functions via FFI
18* Calling functions marked unsafe
19
· · ·
18▶* Calling functions marked unsafe
19
20These safety checks can be relaxed for a section of the code by wrapping the
+ 3 more matches in this file