You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/expressions/array-expr.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ The first form lists out every value in the array.
23
23
r[expr.array.array-syntax]
24
24
The syntax for this form is a comma-separated list of expressions of uniform type enclosed in square brackets.
25
25
26
-
r[expr.array.array-behaviour]
26
+
r[expr.array.array-behavior]
27
27
This produces an array containing each of these values in the order they are written.
28
28
29
29
r[expr.array.repeat]
@@ -38,7 +38,7 @@ The expression after the `;` is called the *length operand*.
38
38
r[expr.array.length-restriction]
39
39
It must have type `usize` and be a [constant expression], such as a [literal] or a [constant item].
40
40
41
-
r[expr.array.repeat-behaviour]
41
+
r[expr.array.repeat-behavior]
42
42
An array expression of this form creates an array with the length of the value of the length operand with each element being a copy of the repeat operand.
43
43
That is, `[a; b]` creates an array containing `b` copies of the value of `a`.
Copy file name to clipboardExpand all lines: src/expressions/operator-expr.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -205,7 +205,7 @@ The question mark operator (`?`) unwraps valid values or returns erroneous value
205
205
r[expr.try.constraint]
206
206
It is a unary postfix operator that can only be applied to the types `Result<T, E>` and `Option<T>`.
207
207
208
-
r[expr.try.behaviour-std-result]
208
+
r[expr.try.behavior-std-result]
209
209
When applied to values of the `Result<T, E>` type, it propagates errors.
210
210
211
211
r[expr.try.effects-err]
@@ -227,7 +227,7 @@ println!("{:?}", res);
227
227
# assert!(res.is_err())
228
228
```
229
229
230
-
r[expr.try.behaviour-std-option]
230
+
r[expr.try.behavior-std-option]
231
231
When applied to values of the `Option<T>` type, it propagates `None`s.
232
232
233
233
r[expr.try.effects-none]
@@ -308,7 +308,7 @@ r[expr.arith-logic.syntax]
308
308
r[expr.arith-logic.syntax]
309
309
Binary operators expressions are all written with infix notation.
310
310
311
-
r[expr.arith-logic.behaviour]
311
+
r[expr.arith-logic.behavior]
312
312
This table summarizes the behavior of arithmetic and logical binary operators on primitive types and which traits are used to overload these operators for other types.
313
313
Remember that signed integers are always represented using two's complement.
314
314
The operands of all of these operators are evaluated in [value expression context][value expression] so are moved or copied.
@@ -387,7 +387,7 @@ a == b;
387
387
388
388
This means that the operands don't have to be moved out of.
`*const T` / `*mut T` can be cast to `*const U` / `*mut U` with the following behavior:
609
609
610
610
r[expr.as.pointer.sized]
@@ -638,10 +638,10 @@ An *assignment expression* moves a value into a specified place.
638
638
r[expr.assign.assignee]
639
639
An assignment expression consists of a [mutable][assignee expression], the *assignee operand*, followed by an equals sign (`=`) and a [value expression], the *assigned value operand*.
640
640
641
-
r[expr.assign.behaviour-basic]
641
+
r[expr.assign.behavior-basic]
642
642
In its most basic form, an assignee expression is a [place expression], and we discuss this case first.
643
643
644
-
r[expr.assign.behaviour-destructring]
644
+
r[expr.assign.behavior-destructring]
645
645
The more general case of destructuring assignment is discussed below, but this case always decomposes into sequential assignments to place expressions, which may be considered the more fundamental case.
646
646
647
647
### Basic assignments
@@ -660,7 +660,7 @@ For destructuring assignment, subexpressions of the assignee expression are eval
660
660
r[expr.assign.drop-target]
661
661
It then has the effect of first [dropping] the value at the assigned place, unless the place is an uninitialized local variable or an uninitialized field of a local variable.
662
662
663
-
r[expr.assign.behaviour]
663
+
r[expr.assign.behavior]
664
664
Next it either [copies or moves] the assigned value to the assigned place.
Copy file name to clipboardExpand all lines: src/expressions/range-expr.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ r[expr.range.syntax]
30
30
> _RangeToInclusiveExpr_ :\
31
31
> `..=`[_Expression_]
32
32
33
-
r[expr.range.behaviour]
33
+
r[expr.range.behavior]
34
34
The `..` and `..=` operators will construct an object of one of the `std::ops::Range` (or `core::ops::Range`) variants, according to the following table:
Copy file name to clipboardExpand all lines: src/expressions/return-expr.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ r[expr.return.syntax]
10
10
r[expr.return.intro]
11
11
Return expressions are denoted with the keyword `return`.
12
12
13
-
r[expr.return.behaviour]
13
+
r[expr.return.behavior]
14
14
Evaluating a `return` expression moves its argument into the designated output location for the current function call, destroys the current function activation frame, and transfers control to the caller frame.
0 commit comments