summary refs log tree commit diff
path: root/src/libcore/ops
AgeCommit message (Collapse)AuthorLines
2017-08-15Fix typos & us spellingsFourchaux-1/+1
2017-08-14Add missing newline in Deref docs to fix renderinglukaramu-0/+2
Fixes #43866.
2017-08-13Rollup merge of #43814 - Eijebong:fix_typos2, r=petrochenkovGuillaume Gomez-1/+1
Fix some typos Follow up of #43794 If refined my script a little bit and found some more.
2017-08-12Auto merge of #43724 - lukaramu:std-ops-docs, r=QuietMisdreavusbors-529/+615
Improve std::ops docs Fixes #29365. (This fixes all but one point from @steveklabnik's list, but that point was referring to examples of implementing range traits, but there are no range traits in std::ops.) The main changes are quite a bit of copyediting, adding more "real" examples for some of the traits, incorporating some guidance from the API docs, more linking (cross-docs and to the book & reference), cleaning up examples, moving things around, and so on. Refer to the commit messages for more details. Note: I decided to link to the second edition of the book since I think it's more appropriate now for the sections I linked, if this is not okay, please say so!
2017-08-12std::ops docs: incorporated changes suggested in reviewlukaramu-58/+82
* fixed link typos and copy-paster errors * rewrote Fn* explanations * `RHS = Self` -> `RHS` is `Self` (added that to all applicable places as well) * fixed up some links * s/MutDeref/DerefMut * removed remaining superfluous `fn main()`s * fixed some minor phrasings and factual errors and inaccuracies std::ops docs: Fix phrasing and factual errors/inaccuracies
2017-08-12Fix some typosBastien Orivel-1/+1
2017-08-12Auto merge of #43794 - Eijebong:fix_typos, r=lukaramu,steveklanik,imperiobors-1/+1
Fix some typos I wrote a really naive script and found those typos in the documentation.
2017-08-11Fix some more typos, this time words that are duplicated.Bastien Orivel-1/+1
2017-08-08Added to core::ops module docslukaramu-5/+12
Part of #29365. * Added paragraph adapted from API guidelines that operator implementations should be unsurprising * Modified Point example to be more clear when just reading it
2017-08-08Revised core::ops::range::* docslukaramu-95/+120
Part of #29365. * Strenghtened summary/explanation split, making phrasings more parallel * Added links throughout * Fixed some example formatting & removed extraneous `fn main()`s (or hid then when needed because of `#![features]`. * Emphasized note on `RangeFrom`'s `Iterator` implementation * Added summary sentences to (unstable) `contains` methods
2017-08-07Revise `Fn`/`FnMut`/`FnOnce` documentationlukaramu-21/+74
Part of #29365. * Moved explanations out of Examples section and expanded on them. * Made the super-/subtrait relationships more explicit. * Added links to the other traits, TRPL and the nomicon where appropriate * Changed method summaries to be in 3rd person singular * General copyediting
2017-08-07Revise `Index` and `IndexMut` docs.lukaramu-26/+23
Part of #29365. * Shortened summary sentences, removing "stuttering" * Small copyediting * Changed method summary sentences to be in 3rd person singular * Removed extraneous explicit `fn main()` in example for `IndexMut`
2017-08-07Revise `Drop` docslukaramu-22/+40
Part of #29365. * Removed "stuttering" in summary sentence. * Copy-edited the explanaition sections * Added sub-headings in Examples section to aid linking * Actually implement `Drop` in the `PrintOnDrop` exampl * Add link to Drop chapter in TRPL * Changed `drop` summary sentence to be in 3rd person singular * Added missing link to `panic!`
2017-08-07Expand docs on `Deref` and `DerefMut`lukaramu-24/+78
Part of #29365. * Expanded the explanaition sections, adapting some parts from the book, the reference, as well as the API guidelines. As such, the docs now explicitly state that `Deref` and `DerefMut` should only be implemented for smart pointers and that they should not fail. Additionally, there is now a short primer on `Deref` coercion. * Added links to `DerefMut` from `Deref` and vice versa * Added links to relevant reference sections * Removed "stuttering" in summary sentences * Changed summary sentences of `Deref::deref` and `Deref::deref_mut` to be in 3rd person singular * Removed explicit uses of `fn main()` in the examples
2017-08-07Revise documentation in core::ops::bitlukaramu-150/+122
Part of #29365. * Added "real" examples for `BitOrAssign`, `BitXorAssign`, `ShlAssign`, and `ShrAssign` * Rewrote method summary senteces to be in 3rd person singular * Rephrased example introductions to be less redundant ("in this example" etc.) and to not use "trivial" * Removed superfluous explicit `fn main()`s in examples * Added some missing periods
2017-08-07Revise documentation in core::ops::arithlukaramu-182/+118
Part of #29365. * Replaced examples for Mul-/Div-/RemAssign with more illustrative ones * Made summary senteces for the trait methods use third person singular * Moved some explanations from Examples section to main explanation * Switched around argument order for the vector-scalar multiplication example such that the vector is on the left side (as it would be expected if one were to switch from `*` to `*=`) * Replaced mostly redundant example introductions with headings in traits with more than one example (where it made sense) * Cleaned up some examples to derive `PartialEq` instead of implementing it manually when that wasn't needed * Removed explicit `fn main()`s in examples where they weren't necessary * Rephrased some things * Added some missing periods * Fixed some formatting/punctuation in examples
2017-08-01Fixed all unnecessary muts in language coreIsaac van Bakel-1/+1
2017-07-27Use `rustc_on_unimplemented`'s trait name argument in `try`Esteban Küber-1/+1
2017-07-22Add generic example of std::ops::Sub in doc commentsmandeep-0/+36
2017-07-05Add `rustc_on_unimplemented` message to `std::ops::Try`Esteban Küber-0/+2
2017-06-30Revert "Stabilize RangeArgument"Steven Fackler-168/+9
This reverts commit 143206d54d7558c2326212df99efc98110904fdb.
2017-06-24Stabilize RangeArgumentSteven Fackler-9/+168
Move it and Bound to core::ops while we're at it. Closes #30877
2017-06-23Removed as many "```ignore" as possible.kennytm-5/+20
Replaced by adding extra imports, adding hidden code (`# ...`), modifying examples to be runnable (sorry Homura), specifying non-Rust code, and converting to should_panic, no_run, or compile_fail. Remaining "```ignore"s received an explanation why they are being ignored.
2017-06-19Bump version and stage0 compilerAlex Crichton-67/+0
2017-06-15Update older URLs pointing to the first edition of the BookWonwoo Choi-2/+2
`compiler-plugins.html` is moved into the Unstable Book. Explanation is slightly modified to match the change.
2017-06-09Move Drop to module.Clar Charr-90/+103
2017-06-09Move CoerceUnsized to module.Clar Charr-69/+82
2017-06-09Move Index to module.Clar Charr-149/+162
2017-06-09Move Deref to module.Clar Charr-110/+123
2017-06-09Move Try to module.Clar Charr-102/+118
2017-06-09Move placement new operators to module.Clar Charr-119/+130
2017-06-09Move bit ops to module.Clar Charr-830/+846
2017-06-09Move arithmetic ops to module.Clar Charr-864/+880
2017-06-09Move Fn to module.Clar Charr-185/+198
2017-06-07Move Range to module.Clar Charr-356/+374
2017-06-07Move ops.rs to folder.Clar Charr-0/+3021