Clarify that Copy is a trait in array docs

This commit is contained in:
Coca162 2023-02-27 15:16:39 +00:00
parent dc9732620d
commit 22b65fc275
No known key found for this signature in database
GPG Key ID: 03282DF88179AB19
2 changed files with 2 additions and 2 deletions

View File

@ -589,7 +589,7 @@ mod prim_pointer {}
/// * A list with each element, i.e., `[x, y, z]`. /// * A list with each element, i.e., `[x, y, z]`.
/// * A repeat expression `[expr; N]` where `N` is how many times to repeat `expr` in the array. `expr` must either be: /// * A repeat expression `[expr; N]` where `N` is how many times to repeat `expr` in the array. `expr` must either be:
/// ///
/// * A value of type `Copy` /// * A value of a type implementing the [`Copy`] trait
/// * A `const` value /// * A `const` value
/// ///
/// Note that `[expr; 0]` is allowed, and produces an empty array. /// Note that `[expr; 0]` is allowed, and produces an empty array.

View File

@ -589,7 +589,7 @@ mod prim_pointer {}
/// * A list with each element, i.e., `[x, y, z]`. /// * A list with each element, i.e., `[x, y, z]`.
/// * A repeat expression `[expr; N]` where `N` is how many times to repeat `expr` in the array. `expr` must either be: /// * A repeat expression `[expr; N]` where `N` is how many times to repeat `expr` in the array. `expr` must either be:
/// ///
/// * A value of type `Copy` /// * A value of a type implementing the [`Copy`] trait
/// * A `const` value /// * A `const` value
/// ///
/// Note that `[expr; 0]` is allowed, and produces an empty array. /// Note that `[expr; 0]` is allowed, and produces an empty array.