about summary refs log tree commit diff
path: root/src/libcore/ops/deref.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-194/+0
2020-05-31Rephrase term 'non-pointer type'JOE1994-4/+4
If the reader assumes that 'pointer type's include 'smart pointer's, the term 'non-pointer type' could mislead the reader to assume that x should not be a smart pointer type. I tried to rephrase the term 'non-pointer type' to remove ambiguity in the doc comments. closes #72335 Thank you for reviewing this PR! :)
2020-04-25Bump bootstrap compilerMark Rousskov-1/+0
2020-03-26permit negative impls for non-auto traitsNiko Matsakis-0/+4
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-3/+3
2019-11-26Format libcore with rustfmtDavid Tolnay-3/+9
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-05-30Fix links in Deref documentationGuillaume Gomez-6/+6
2019-03-18Replaced self-reflective explicit types with clearer `Self` or `Self::…` ↵Vincent Esche-3/+3
in stdlib docs
2019-01-27Auto merge of #57765 - Mark-Simulacrum:bootstrap-bump, r=alexcrichtonbors-1/+1
Bump bootstrap compiler to 1.33 beta r? @alexcrichton or @pietroalbini cc @rust-lang/release
2019-01-26Bump bootstrap compiler to 1.33 betaMark Rousskov-1/+1
2019-01-22Fixed Deref coercion explanation for DerefMut using shared referencesdanielhenrymantilla-1/+1
2019-01-01Fix broken links to second edition TRPL.Corey Farwell-2/+2
Fixes https://github.com/rust-lang/rust/issues/57104.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-20Stabilize `Rc`, `Arc` and `Pin` as method receiversMichael Hewson-0/+16
This lets you write methods using `self: Rc<Self>`, `self: Arc<Self>`, `self: Pin<&mut Self>`, `self: Pin<Box<Self>`, and other combinations involving `Pin` and another stdlib receiver type, without needing the `arbitrary_self_types`. Other user-created receiver types can be used, but they still require the feature flag to use. This is implemented by introducing a new trait, `Receiver`, which the method receiver's type must implement if the `arbitrary_self_types` feature is not enabled. To keep composed receiver types such as `&Arc<Self>` unstable, the receiver type is also required to implement `Deref<Target=Self>` when the feature flag is not enabled. This lets you use `self: Rc<Self>` and `self: Arc<Self>` in stable Rust, which was not allowed previously. It was agreed that they would be stabilized in #55786. `self: Pin<&Self>` and other pinned receiver types do not require the `arbitrary_self_types` feature, but they cannot be used on stable because `Pin` still requires the `pin` feature.
2018-09-29Use impl_header_lifetime_elision in libcoreScott McMurray-3/+3
2018-04-28Auto merge of #50149 - aaronaaeng:master, r=estebankbors-0/+1
Added warning for unused arithmetic expressions The compiler now displays a warning when a binary arithmetic operation is evaluated but not used. This resolves #50124 by following the instructions outlined in the issue. The changes are as follows: - Added new pattern matching for unused arithmetic expressions in `src/librustc_lint/unused.rs` - Added `#[must_use]` attributes to the binary operation methods in `src/libcore/internal_macros.rs` - Added `#[must_use]` attributes to the non-assigning binary operators in `src/libcore/ops/arith.rs`
2018-04-26Add more doc aliasesGuillaume Gomez-0/+3
2018-04-22Make must_use lint cover all binary/unary operatorsAaron Aaeng-0/+1
2017-12-09Use a better link for method resolution in Deref docsmatthewjasper-4/+4
2017-11-02Fix typoLance John-2/+2
`accomodate` -> `accommodate`
2017-10-02update books for next releasesteveklabnik-2/+2
Also fixes some stdlib links to the reference which have changed.
2017-08-14Add missing newline in Deref docs to fix renderinglukaramu-0/+2
Fixes #43866.
2017-08-12std::ops docs: incorporated changes suggested in reviewlukaramu-1/+1
* 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-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-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 Deref to module.Clar Charr-0/+119