mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-09 01:02:47 +02:00
Update copy-clone.md (#221)
This commit is contained in:
parent
fe8fa8d232
commit
912f592199
@ -45,4 +45,7 @@ In the above example, try the following:
|
||||
* Remove `Copy` from the `derive` attribute. The compiler error is now in the `println!` for `p1`.
|
||||
* Show that it works if you clone `p1` instead.
|
||||
|
||||
If students ask about `derive`, it is sufficient to say that this is a way to generate code in Rust
|
||||
at compile time. In this case the default implementations of `Copy` and `Clone` traits are generated.
|
||||
|
||||
</details>
|
||||
|
Loading…
Reference in New Issue
Block a user