Skip to content

Commit 6f5ef58

Browse files
Jeff Baloghgraydon
authored andcommitted
Fix typos in the docs.
1 parent 1d9212b commit 6f5ef58

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/rust.texi

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2089,7 +2089,7 @@ Vectors can be sliced. A slice expression builds a new vector by copying a
20892089
contiguous range -- given by a pair of indices representing a half-open
20902090
interval -- out of the sliced vector.
20912091

2092-
And example of a @code{vec} type and its use:
2092+
An example of a @code{vec} type and its use:
20932093
@example
20942094
let vec[int] v = vec(7, 5, 3);
20952095
let int i = v.(2);
@@ -2698,9 +2698,9 @@ following the declaration statement.
26982698

26992699
The latter (@code{auto}) form of slot declaration causes the compiler to infer
27002700
the static type of the slot through unification with the types of values
2701-
assigned to the slot in the the remaining code in the block scope. Inference
2702-
only occurs on frame-local slots, not argument slots. Function, iterator and
2703-
object signatures must always declared types for all argument slots.
2701+
assigned to the slot in the remaining code in the block scope. Inference only
2702+
occurs on frame-local slots, not argument slots. Function, iterator and object
2703+
signatures must always declared types for all argument slots.
27042704
@xref{Ref.Mem.Slot}.
27052705

27062706

@@ -2718,11 +2718,11 @@ Executing a copy statement causes the value denoted by the expression --
27182718
either a value or a primitive combination of values -- to be copied into the
27192719
memory location denoted by the @emph{lval}.
27202720

2721-
A copy may entail the the adjustment of reference counts, execution of
2722-
destructors, or similar adjustments in order to respect the path through the
2723-
memory graph implied by the @code{lval}, as well as any existing value held in
2724-
the memory being written-to. All such adjustment is automatic and implied by
2725-
the @code{=} operator.
2721+
A copy may entail the adjustment of reference counts, execution of destructors,
2722+
or similar adjustments in order to respect the path through the memory graph
2723+
implied by the @code{lval}, as well as any existing value held in the memory
2724+
being written-to. All such adjustment is automatic and implied by the @code{=}
2725+
operator.
27262726

27272727
An example of three different copy statements:
27282728
@example
@@ -2740,7 +2740,7 @@ A @code{spawn} statement consists of keyword @code{spawn}, followed by a
27402740
normal @emph{call} statement (@pxref{Ref.Stmt.Call}). A @code{spawn}
27412741
statement causes the runtime to construct a new task executing the called
27422742
function. The called function is referred to as the @dfn{entry function} for
2743-
the spawned task, and its arguments are copied form the spawning task to the
2743+
the spawned task, and its arguments are copied from the spawning task to the
27442744
spawned task before the spawned task begins execution.
27452745

27462746
Functions taking alias-slot arguments, or returning non-nil values, cannot be
@@ -3129,7 +3129,7 @@ variable, executing the loop body once per copy. To perform a for loop on a
31293129
sub-range of a vector or string, form a temporary slice over the sub-range and
31303130
run the loop over the slice.
31313131

3132-
Example of a 4 for loops, all identical:
3132+
Example of 4 for loops, all identical:
31333133
@example
31343134
let vec[foo] v = vec(a, b, c);
31353135

0 commit comments

Comments
 (0)