From 9dd6a1f1194946e0d5eb2c76525cbbfc187a6f6a Mon Sep 17 00:00:00 2001 From: DaErich Date: Wed, 28 Jul 2021 22:12:33 +0200 Subject: [PATCH] array-expr.md: Fix typo;'polished' sentence --- src/expressions/array-expr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/expressions/array-expr.md b/src/expressions/array-expr.md index 65b3e2491..432a45ad8 100644 --- a/src/expressions/array-expr.md +++ b/src/expressions/array-expr.md @@ -21,7 +21,7 @@ The syntax for the second form is two expressions separated by a semicolon (`;`) The expression before the `;` is called the *repeat operand*. The expression after the `;` is called the *length operand*. It must have type `usize` and be a [constant expression], such as a [literal] or a [constant item]. -An array expression of this form creates an array with the length of the value of the legnth operand with each element a copy of the repeat operand. +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. That is, `[a; b]` creates an array containing `b` copies of the value of `a`. If the length operand has a value greater than 1 then this requires that the type of the repeat operand is [`Copy`] or that it must be a [path] to a constant item.