Skip to content

Commit 1f38602

Browse files
chorman0773ehuss
authored andcommitted
Fix spelling from behaviour to behavior
1 parent b25591a commit 1f38602

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

src/expressions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ An expression *evaluates to* a value, and has effects during *evaluation*.
5555
r[expr.operands]
5656
Many expressions contain sub-expressions, called the *operands* of the expression.
5757

58-
r[expr.behaviour]
58+
r[expr.behavior]
5959
The meaning of each kind of expression dictates several things:
6060

6161
* Whether or not to evaluate the operands when evaluating the expression

src/expressions/array-expr.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The first form lists out every value in the array.
2323
r[expr.array.array-syntax]
2424
The syntax for this form is a comma-separated list of expressions of uniform type enclosed in square brackets.
2525

26-
r[expr.array.array-behaviour]
26+
r[expr.array.array-behavior]
2727
This produces an array containing each of these values in the order they are written.
2828

2929
r[expr.array.repeat]
@@ -38,7 +38,7 @@ The expression after the `;` is called the *length operand*.
3838
r[expr.array.length-restriction]
3939
It must have type `usize` and be a [constant expression], such as a [literal] or a [constant item].
4040

41-
r[expr.array.repeat-behaviour]
41+
r[expr.array.repeat-behavior]
4242
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.
4343
That is, `[a; b]` creates an array containing `b` copies of the value of `a`.
4444

src/expressions/match-expr.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ A `match` expression has a *[scrutinee] expression*, which is the value to compa
3636
r[expr.match.scrutinee-constraint]
3737
The scrutinee expression and the patterns must have the same type.
3838

39-
r[expr.match.scrutinee-behaviour]
39+
r[expr.match.scrutinee-behavior]
4040
A `match` behaves differently depending on whether or not the scrutinee expression is a [place expression or value expression][place expression].
4141

4242
r[expr.match.scrutinee-value]
@@ -111,7 +111,7 @@ Match arms can accept _match guards_ to further refine the criteria for matching
111111
r[expr.match.guard.type]
112112
Pattern guards appear after the pattern and consist of a `bool`-typed expression following the `if` keyword.
113113

114-
r[expr.match.guard.behaviour]
114+
r[expr.match.guard.behavior]
115115
When the pattern matches successfully, the pattern guard expression is executed.
116116
If the expression evaluates to true, the pattern is successfully matched against.
117117

src/expressions/operator-expr.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ The question mark operator (`?`) unwraps valid values or returns erroneous value
205205
r[expr.try.constraint]
206206
It is a unary postfix operator that can only be applied to the types `Result<T, E>` and `Option<T>`.
207207

208-
r[expr.try.behaviour-std-result]
208+
r[expr.try.behavior-std-result]
209209
When applied to values of the `Result<T, E>` type, it propagates errors.
210210

211211
r[expr.try.effects-err]
@@ -227,7 +227,7 @@ println!("{:?}", res);
227227
# assert!(res.is_err())
228228
```
229229

230-
r[expr.try.behaviour-std-option]
230+
r[expr.try.behavior-std-option]
231231
When applied to values of the `Option<T>` type, it propagates `None`s.
232232

233233
r[expr.try.effects-none]
@@ -308,7 +308,7 @@ r[expr.arith-logic.syntax]
308308
r[expr.arith-logic.syntax]
309309
Binary operators expressions are all written with infix notation.
310310

311-
r[expr.arith-logic.behaviour]
311+
r[expr.arith-logic.behavior]
312312
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.
313313
Remember that signed integers are always represented using two's complement.
314314
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;
387387

388388
This means that the operands don't have to be moved out of.
389389

390-
r[expr.cmp.behaviour]
390+
r[expr.cmp.behavior]
391391

392392
| Symbol | Meaning | Overloading method |
393393
|--------|--------------------------|----------------------------|
@@ -672,7 +672,7 @@ assert_eq!(values[1], 3);
672672

673673
r[expr.as.pointer]
674674

675-
r[expr.as.pointer.behaviour]
675+
r[expr.as.pointer.behavior]
676676
`*const T` / `*mut T` can be cast to `*const U` / `*mut U` with the following behavior:
677677

678678
r[expr.as.pointer.sized]
@@ -706,10 +706,10 @@ An *assignment expression* moves a value into a specified place.
706706
r[expr.assign.assignee]
707707
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*.
708708

709-
r[expr.assign.behaviour-basic]
709+
r[expr.assign.behavior-basic]
710710
In its most basic form, an assignee expression is a [place expression], and we discuss this case first.
711711

712-
r[expr.assign.behaviour-destructring]
712+
r[expr.assign.behavior-destructring]
713713
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.
714714

715715
### Basic assignments
@@ -728,7 +728,7 @@ For destructuring assignment, subexpressions of the assignee expression are eval
728728
r[expr.assign.drop-target]
729729
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.
730730

731-
r[expr.assign.behaviour]
731+
r[expr.assign.behavior]
732732
Next it either [copies or moves] the assigned value to the assigned place.
733733

734734
r[expr.assign.result]

src/expressions/range-expr.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ r[expr.range.syntax]
3030
> _RangeToInclusiveExpr_ :\
3131
> &nbsp;&nbsp; `..=` [_Expression_]
3232
33-
r[expr.range.behaviour]
33+
r[expr.range.behavior]
3434
The `..` and `..=` operators will construct an object of one of the `std::ops::Range` (or `core::ops::Range`) variants, according to the following table:
3535

3636
| Production | Syntax | Type | Range |

src/expressions/return-expr.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ r[expr.return.syntax]
1010
r[expr.return.intro]
1111
Return expressions are denoted with the keyword `return`.
1212

13-
r[expr.return.behaviour]
13+
r[expr.return.behavior]
1414
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.
1515

1616
An example of a `return` expression:

0 commit comments

Comments
 (0)