]> git.lizzy.rs Git - rust.git/commit
replace Add example with something more evocative of addition
authorMatthew Piziak <matthew.piziak@gmail.com>
Tue, 16 Aug 2016 08:11:48 +0000 (04:11 -0400)
committerMatthew Piziak <matthew.piziak@gmail.com>
Thu, 18 Aug 2016 00:37:31 +0000 (20:37 -0400)
commitdcee93a8030c3a62c5a05b45b050f90251d93af8
treeb964e1bd288edb951899c01a8845a558cbeb0a90
parentf65d96fe3fa3cfae2cfc88be40f7416a22c88bf2
replace Add example with something more evocative of addition

Currently most of the operator traits use trivial implementation
examples that only perform side effects. Honestly, that might not be too
bad for the sake of documentation; but anyway, here's a proposal to move
a slightly modified version of the module-level point-addition example
into the `Add` documentation, since it's more evocative of addition
semantics.

Part of #29365

wrap identifiers in backticks

minor rephrasing

fix module-level documentation to be more truthful

This branch changes the example for `Add` to no longer be a "minimum implementation that prints something to the screen".
src/libcore/ops.rs