about summary refs log tree commit diff
path: root/src/libcore/ops/function.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-289/+0
2020-07-26Fixed typo in `closure`Alex-1/+1
2020-07-23Add missing backticks in diagnostics noteYuki Okushi-3/+3
2020-07-16apply bootstrap cfgsMark Rousskov-1/+1
2020-06-24Implement associated lang itemsAaron Hill-0/+1
Fixes #70718 This commit allows making associated items (e.g. associated functions and types) into lang items via the `#[lang]` attribute. This allows such items to be accessed directly, rather than by iterating over the parent item's associated items. I've added `FnOnce::Output` as a lang item, and updated one old usage to use the new lang item. The remaining uses can be updated separately.
2019-12-26Convert collapsed to shortcut reference linksMatthew Kraai-4/+4
2019-11-26Format libcore with rustfmtDavid Tolnay-21/+35
This commit applies rustfmt with default settings to files in src/libcore *that are not involved in any currently open PR* to minimize merge conflicts. The list of files involved in open PRs was determined by querying GitHub's GraphQL API with this script: https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8 With the list of files from the script in `outstanding_files`, the relevant commands were: $ find src/libcore -name '*.rs' | xargs rustfmt --edition=2018 $ rg libcore outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of libcore.
2019-11-16Suggest borrowing when it would satisfy an unmet trait boundEsteban Küber-4/+0
When there are multiple implementors for the same trait that is present in an unmet binding, modify the E0277 error to refer to the parent obligation and verify whether borrowing the argument being passed in would satisfy the unmet bound. If it would, suggest it.
2019-08-24Added an extra line to make the formatting conform to the rest of the document.Christian-0/+1
2019-08-24Removed the confusing FnOnce example. closes #47091Christian-9/+0
2019-07-25Add note suggesting to borrow a String argument to findEsteban Küber-0/+4
2019-02-07Add #[must_use] message to Fn* traitsTaiki Endo-3/+3
2019-01-01Fix broken links to second edition TRPL.Corey Farwell-3/+3
Fixes https://github.com/rust-lang/rust/issues/57104.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-10Add #[must_use] attribute to stdlib traitsFelix Chapman-0/+3
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-3/+3
2018-09-29Use impl_header_lifetime_elision in libcoreScott McMurray-5/+5
2018-08-15When closure with no arguments was expected, suggest wrappingEsteban Küber-0/+15
2017-08-12Auto merge of #43724 - lukaramu:std-ops-docs, r=QuietMisdreavusbors-24/+104
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-33/+60
* 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-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-01Fixed all unnecessary muts in language coreIsaac van Bakel-1/+1
2017-06-09Move Fn to module.Clar Charr-0/+194