1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-31 11:01:46 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)]