Skip to content

Commit 3b0279a

Browse files
committed
---
yaml --- r: 160377 b: refs/heads/auto c: b825b34 h: refs/heads/master i: 160375: 49d7a80 v: v3
1 parent 22c1975 commit 3b0279a

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
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: c287afb2fa530d22563391737ac1d44faf2f9b2e
13+
refs/heads/auto: b825b3496aff1ed784f7a7ca935245208b95aabb
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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)