1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-16 22:27:34 +02:00

Additional sentence for derive macros (#1003)

This commit is contained in:
Dominik Maier
2023-07-18 11:02:49 +02:00
committed by GitHub
parent 640be0770a
commit 0411d0c8e5

View File

@ -1,6 +1,8 @@
# Deriving Traits
You can let the compiler derive a number of traits:
Rust derive macros work by automatically generating code that implements the specified traits for a data structure.
You can let the compiler derive a number of traits as follows:
```rust,editable
#[derive(Debug, Clone, PartialEq, Eq, Default)]