Skip to content

Commit

Permalink
Update list of types with magic Copy impls
Browse files Browse the repository at this point in the history
Numeric types, char, bool, `!`, and raw pointers all have ordinary Copy impls in std, not
provided by the compiler.
  • Loading branch information
bstrie committed Nov 8, 2021
1 parent a01d151 commit 07704ed
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/special-types-and-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,11 @@ For unions, this means all variants have to be `Copy`.

`Copy` is implemented by the compiler for

* [Numeric types]
* `char`, `bool`, and [`!`]
* [Tuples] of `Copy` types
* [Arrays] of `Copy` types
* [Shared references]
* [Raw pointers]
* [Function pointers] and [function item types]
* [Function pointers]
* [Function items]

## `Clone`

Expand Down Expand Up @@ -168,21 +166,18 @@ These implicit `Sized` bounds may be relaxed by using the special `?Sized` bound
[drop check]: ../nomicon/dropck.html
[dynamically sized type]: dynamically-sized-types.md
[Function pointers]: types/function-pointer.md
[function item types]: types/function-item.md
[Function items]: types/function-item.md
[implementation items]: items/implementations.md
[indexing expressions]: expressions/array-expr.md#array-and-slice-indexing-expressions
[interior mutability]: interior-mutability.md
[Numeric types]: types/numeric.md
[Methods]: items/associated-items.md#associated-functions-and-methods
[method resolution]: expressions/method-call-expr.md
[operators]: expressions/operator-expr.md
[orphan rules]: items/implementations.md#trait-implementation-coherence
[Raw pointers]: types/pointer.md#raw-pointers-const-and-mut
[`static` items]: items/static-items.md
[Shared references]: types/pointer.md#shared-references-
[the standard library]: ../std/index.html
[trait object]: types/trait-object.md
[Tuples]: types/tuple.md
[Type parameters]: types/parameters.md
[variance]: subtyping.md#variance
[`!`]: types/never.md

0 comments on commit 07704ed

Please sign in to comment.