Skip to content

Commit c520969

Browse files
committed
Add attributes.derive.built-in
cc #540
1 parent fa6fc39 commit c520969

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/attributes/derive.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ The `derive` attribute may be specified multiple times on an item, with all entr
3838
r[attributes.derive.stdlib]
3939
The `derive` attribute is exported in the standard library prelude as [`core::prelude::v1::derive`].
4040
41+
r[attributes.derive.built-in]
42+
Built-in derives are defined in the [language prelude][names.preludes.lang]. The list of built-in derives are:
43+
44+
- [`Clone`]
45+
- [`Copy`]
46+
- [`Debug`]
47+
- [`Default`]
48+
- [`Eq`]
49+
- [`Hash`]
50+
- [`Ord`]
51+
- [`PartialEq`]
52+
- [`PartialOrd`]
53+
4154
4255
r[attributes.derive.automatically_derived]
4356
## The `automatically_derived` attribute

src/names/preludes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ It includes the following:
124124
* [floating-point types] --- `f32` and `f64`
125125
* [Macro namespace]
126126
* [Built-in attributes]
127+
* [Built-in derive macros][attributes.derive.built-in]
127128
128129
r[names.preludes.macro_use]
129130
## `macro_use` prelude

0 commit comments

Comments
 (0)