Skip to content

Commit 953829f

Browse files
authored
Merge pull request #1104 from bstrie/magic-copy
Update list of types with magic Copy impls
2 parents a01d151 + d3cf0c6 commit 953829f

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/special-types-and-traits.md

+5-12
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,10 @@ For unions, this means all variants have to be `Copy`.
6767

6868
`Copy` is implemented by the compiler for
6969

70-
* [Numeric types]
71-
* `char`, `bool`, and [`!`]
7270
* [Tuples] of `Copy` types
73-
* [Arrays] of `Copy` types
74-
* [Shared references]
75-
* [Raw pointers]
76-
* [Function pointers] and [function item types]
71+
* [Function pointers]
72+
* [Function items]
73+
* [Closures] that capture no values or that only capture values of `Copy` types
7774

7875
## `Clone`
7976

@@ -83,7 +80,6 @@ types:
8380

8481
* Types with a built-in `Copy` implementation (see above)
8582
* [Tuples] of `Clone` types
86-
* [Arrays] of `Clone` types
8783

8884
## `Send`
8985

@@ -168,21 +164,18 @@ These implicit `Sized` bounds may be relaxed by using the special `?Sized` bound
168164
[drop check]: ../nomicon/dropck.html
169165
[dynamically sized type]: dynamically-sized-types.md
170166
[Function pointers]: types/function-pointer.md
171-
[function item types]: types/function-item.md
167+
[Function items]: types/function-item.md
172168
[implementation items]: items/implementations.md
173169
[indexing expressions]: expressions/array-expr.md#array-and-slice-indexing-expressions
174170
[interior mutability]: interior-mutability.md
175-
[Numeric types]: types/numeric.md
176171
[Methods]: items/associated-items.md#associated-functions-and-methods
177172
[method resolution]: expressions/method-call-expr.md
178173
[operators]: expressions/operator-expr.md
179174
[orphan rules]: items/implementations.md#trait-implementation-coherence
180-
[Raw pointers]: types/pointer.md#raw-pointers-const-and-mut
181175
[`static` items]: items/static-items.md
182-
[Shared references]: types/pointer.md#shared-references-
183176
[the standard library]: ../std/index.html
184177
[trait object]: types/trait-object.md
185178
[Tuples]: types/tuple.md
186179
[Type parameters]: types/parameters.md
187180
[variance]: subtyping.md#variance
188-
[`!`]: types/never.md
181+
[Closures]: types/closure.md

0 commit comments

Comments
 (0)