]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #33815 - carols10cents:trait-documentation-clarifications, r=steveklabnik
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 27 May 2016 08:50:03 +0000 (10:50 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 27 May 2016 08:50:03 +0000 (10:50 +0200)
commit967c3880d8f4e458cbad83f5df580e00c142aca4
tree6c72bc365984919dabfd56ced7f99e2ac4bee0b5
parent575149561e863a37b1a123851d1906684a49368d
parent1e809f57a45a187a2a8c49d4d93ec64c089873ca
Rollup merge of #33815 - carols10cents:trait-documentation-clarifications, r=steveklabnik

Trait documentation clarifications

Hi! I've felt a bit of friction lately in figuring out how to write custom implementations of the `derive`able traits, so I decided to add to the docs :)

The docs for `Copy` are already excellent-- clear, useful sections that I only reordered a bit-- they're now:

* General explanation
* When can my type be `Copy`?
* When can my type _not_ be `Copy`?
* When should my type be `Copy`?
* Derivable
* How can I implement `Copy`?

I didn't add all these sections for all the traits, but I did make sure all the derivable traits had a consistent "Derivable" section that explained what the derived implementation does and a "How can I implement" section that has an example.

Please check me for correctness-- I tried to do research to make sure I was saying accurate things but I'm still learning! ❤️ I'd also love suggestions on information to add that is still missing-- I think these traits are important and deserve to have awesome docs!