File tree Expand file tree Collapse file tree 6 files changed +14
-10
lines changed Expand file tree Collapse file tree 6 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ edit-url-template = "https://github.com/rust-lang/reference/edit/master/{path}"
1010
1111[output .html .redirect ]
1212"/expressions/enum-variant-expr.html" = " struct-expr.html"
13+ "/unsafe-blocks.html" = " unsafe-keyword.html"
14+ "/unsafe-functions.html" = " unsafe-keyword.html"
1315
1416[rust ]
1517edition = " 2021"
Original file line number Diff line number Diff line change 118118- [ Inline assembly] ( inline-assembly.md )
119119
120120- [ Unsafety] ( unsafety.md )
121- - [ Unsafe functions] ( unsafe-functions.md )
122- - [ Unsafe blocks] ( unsafe-blocks.md )
121+ - [ The ` unsafe ` keyword] ( unsafe-keyword.md )
123122 - [ Behavior considered undefined] ( behavior-considered-undefined.md )
124123 - [ Behavior not considered unsafe] ( behavior-not-considered-unsafe.md )
125124
Original file line number Diff line number Diff line change @@ -347,7 +347,7 @@ trait object whose methods are attributed.
347347[ target architecture ] : ../conditional-compilation.md#target_arch
348348[ trait ] : ../items/traits.md
349349[ undefined behavior ] : ../behavior-considered-undefined.md
350- [ unsafe function ] : ../unsafe-functions .md
350+ [ unsafe function ] : ../unsafe-keyword .md
351351[ rust-abi ] : ../items/external-blocks.md#abi
352352[ `core::intrinsics::caller_location` ] : ../../core/intrinsics/fn.caller_location.html
353353[ `core::panic::Location::caller` ] : ../../core/panic/struct.Location.html#method.caller
Original file line number Diff line number Diff line change @@ -62,5 +62,5 @@ restrictions as [regular function parameters].
6262[ closures ] : closure.md
6363[ extern function ] : ../items/functions.md#extern-function-qualifier
6464[ function items ] : function-item.md
65- [ unsafe function ] : ../unsafe-functions .md
65+ [ unsafe function ] : ../unsafe-keyword .md
6666[ regular function parameters ] : ../items/functions.md#attributes-on-function-parameters
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- # Unsafe blocks
1+ # The ` unsafe ` keyword
2+
3+ ## Unsafe functions
4+
5+ Unsafe functions are functions that are not safe in all contexts and/or for all
6+ possible inputs. Such a function must be prefixed with the keyword ` unsafe ` and
7+ can only be called from an ` unsafe ` block or another ` unsafe ` function.
8+
9+ ## Unsafe blocks
210
311A block of code can be prefixed with the ` unsafe ` keyword, to permit calling
412` unsafe ` functions or dereferencing raw pointers within a safe function.
You can’t perform that action at this time.
0 commit comments