Skip to content

Commit a4c2f93

Browse files
committed
---
yaml --- r: 160255 b: refs/heads/snap-stage3 c: b825b34 h: refs/heads/master i: 160253: 65916f5 160251: 0045043 160247: d6ebfe4 160239: aa83389 160223: c4530f2 160191: 05fc61b 160127: 3989d9c 159999: 13d4cc4 159743: 7152e79 v: v3
1 parent e7bc0aa commit a4c2f93

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: bfaa7bcab3459907014c31d3bf980f65ccd14b08
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: c287afb2fa530d22563391737ac1d44faf2f9b2e
4+
refs/heads/snap-stage3: b825b3496aff1ed784f7a7ca935245208b95aabb
55
refs/heads/try: 225de0d60f8ca8dcc62ab2fd8818ebbda4b58cfe
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/doc/reference.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,13 +1114,13 @@ Rust:
11141114
##### Unsafe functions
11151115

11161116
Unsafe functions are functions that are not safe in all contexts and/or for all
1117-
possible inputs. Such a function must be prefixed with the keyword `unsafe`.
1117+
possible inputs. Such a function must be prefixed with the keyword `unsafe` and
1118+
can only be called from an `unsafe` block or another `unsafe` function.
11181119

11191120
##### Unsafe blocks
11201121

1121-
A block of code can also be prefixed with the `unsafe` keyword, to permit
1122-
calling `unsafe` functions or dereferencing raw pointers within a safe
1123-
function.
1122+
A block of code can be prefixed with the `unsafe` keyword, to permit calling
1123+
`unsafe` functions or dereferencing raw pointers within a safe function.
11241124

11251125
When a programmer has sufficient conviction that a sequence of potentially
11261126
unsafe operations is actually safe, they can encapsulate that sequence (taken
@@ -1140,12 +1140,11 @@ represented with reference-counted pointers in safe code. By using `unsafe`
11401140
blocks to represent the reverse links as raw pointers, it can be implemented
11411141
with only boxes.
11421142

1143-
##### Behavior considered unsafe
1143+
##### Behavior considered undefined
11441144

1145-
This is a list of behavior which is forbidden in all Rust code. Type checking
1146-
provides the guarantee that these issues are never caused by safe code. An
1147-
`unsafe` block or function is responsible for never invoking this behaviour or
1148-
exposing an API making it possible for it to occur in safe code.
1145+
The following is a list of behavior which is forbidden in all Rust code,
1146+
including within `unsafe` blocks and `unsafe` functions. Type checking provides
1147+
the guarantee that these issues are never caused by safe code.
11491148

11501149
* Data races
11511150
* Dereferencing a null/dangling raw pointer

0 commit comments

Comments
 (0)