From 4cf4eb21e0b5ae860090af4a278f3a2f3301d37e Mon Sep 17 00:00:00 2001 From: tk Date: Wed, 31 May 2023 10:56:23 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=AE=9E=E7=8E=B0=E4=BA=86`C?= =?UTF-8?q?opy=20trait`=E7=9A=84=E7=B1=BB=E5=9E=8B=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chapter_3/chapter_3_7_1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/chapter_3/chapter_3_7_1.md b/src/chapter_3/chapter_3_7_1.md index 180319b..371aff2 100644 --- a/src/chapter_3/chapter_3_7_1.md +++ b/src/chapter_3/chapter_3_7_1.md @@ -245,6 +245,7 @@ Rust中,默认实现了`Copy trait`的类型有: - 布尔类型,`bool`,它的值是`true`和`false`; - 字符类型,`char`; - 元组,当且仅当其包含的类型也都是`Copy`的时候。比如`(i32, i32)`是Copy的,但`(i32, String)`不是; +- 数组,当且仅当其包含的类型也都是`Copy`的时候。比如`[i32; 5]`是Copy的,但`[String; 5]`不是; - 共享指针类型或共享引用类型。 ## 8. 所有权和函数