about summary refs log tree commit diff
path: root/src/libcore/pin.rs
AgeCommit message (Collapse)AuthorLines
2019-03-19Rollup merge of #58939 - taeguk:fix-doc-about-pin, r=rkruppeMazdak Farrokhzad-1/+1
Fix a tiny error in documentation of std::pin. `new_unmoved` must be `mut` for passing to `std::mem::swap`.
2019-03-11Improvements to comments in libstd, libcore, liballoc.Alexander Regueiro-1/+1
2019-03-05Fix a tiny error in documentation of std::pin.Taeguk Kwon-1/+1
2019-03-03Auto merge of #58866 - kennytm:rollup, r=kennytmbors-1/+1
Rollup of 14 pull requests Successful merges: - #58730 (Have all methods of Filter and FilterMap use internal iteration) - #58780 (ManuallyDrop != MaybeUninit) - #58782 (Replace `s` with `self` in docs for str methods taking self.) - #58785 (allow specifying attributes for tool lints) - #58802 (Ensure `record_layout_for_printing()` is inlined.) - #58821 (Fixed a syntax error in the pin docs) - #58830 (tidy: deny(rust_2018_idioms)) - #58832 (Revert switching to GCP on AppVeyor) - #58833 (tools/rustbook: deny(rust_2018_idioms)) - #58835 (tools/remote-test-{client,server}: deny(rust_2018_idioms)) - #58838 (Fix typo in Vec#resize_with documentation) - #58842 (Forbid duplicating Cargo as a dependency) - #58852 (Update toolchain to build NetBSD release) - #58865 (Fix C-variadic function printing)
2019-03-02Bootstrap compiler update for 1.35 releaseMark Rousskov-1/+1
2019-02-28Fixed a syntax error in the pin docsAlex Gaynor-1/+1
2019-02-21take a bit more space for new_unchecked examplesRalf Jung-4/+10
2019-02-21this is for you, tidyRalf Jung-2/+2
2019-02-21explain unsafeRalf Jung-2/+2
2019-02-21we only list some examples of basic typesRalf Jung-1/+1
2019-02-21tweaks and fix weird spaceRalf Jung-1/+1
2019-02-21Apply suggestions from code reviewMazdak Farrokhzad-37/+40
Co-Authored-By: RalfJung <post@ralfj.de>
2019-02-21final pin projections tweakingRalf Jung-27/+23
2019-02-21more pin projections tweakingRalf Jung-10/+17
2019-02-20expand pinning projectionsRalf Jung-38/+41
2019-02-20tweak pinning projectionsRalf Jung-12/+21
2019-02-20tweaksRalf Jung-14/+15
2019-02-19improve wordingRalf Jung-2/+2
2019-02-19improve linked list -> drop transitionRalf Jung-5/+6
2019-02-19please the mericless tidy, oh tidyRalf Jung-1/+1
2019-02-19mention interaction with Deref in introRalf Jung-9/+38
2019-02-19examplesRalf Jung-1/+3
2019-02-19rewrite pin module introRalf Jung-23/+25
2019-02-19more work on projections and RefCell exampleRalf Jung-12/+22
2019-02-19separate section for doubly-linked list, reword projections introRalf Jung-31/+41
2019-02-19Apply suggestions from code reviewRalf Jung-12/+12
Co-Authored-By: RalfJung <post@ralfj.de>
2019-02-19apply some of the feedbackRalf Jung-22/+31
2019-02-19improve Pin documentationRalf Jung-17/+181
2019-02-10libs: doc commentsAlexander Regueiro-6/+6
2019-01-27Update generator transform and generated function signatureWim Looman-0/+1
2019-01-16Fix tidy errors.Alexander Ronald Altman-2/+0
2019-01-16Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.Alexander Ronald Altman-3/+47
2019-01-07Reborrow Pin<P> using &mut in `Pin::set`Taylor Cramer-2/+2
This makes it possible to call `.set` multiple times without using `.as_mut()` first to reborrow the pointer.
2018-12-27Fix typo in pin documentationSean Griffin-1/+1
Affect is a verb, effect is a noun
2018-12-21Fix Unpin docs linkTaylor Cramer-1/+1
2018-12-21Rename Box/Arc/Rc::pinned to ::pinTaylor Cramer-1/+1
2018-12-21Pin stabilization: fix doctestsTaylor Cramer-3/+1
2018-12-21Stabilize PinTaylor Cramer-20/+20
2018-12-21Update Pin API to match the one proposed for stabilizationTaylor Cramer-19/+14
Remove pin::Unpin reexport and add Unpin to the prelude. Change Pin associated functions to methods. Rename get_mut_unchecked_ to get_unchecked_mut Remove impl Unpin for Pin Mark Pin repr(transparent)
2018-12-20Stabilize `Rc`, `Arc` and `Pin` as method receiversMichael Hewson-1/+4
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-12-12Rename Pinned marker type to PhantomPinnedTaylor Cramer-4/+7
2018-12-12Expand documantation for std::pin moduleTaylor Cramer-15/+22
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-09Fix docstring spelling mistakesDaniel Alley-2/+2
2018-11-01Replace CoerceSized trait with DispatchFromDynMichael Hewson-4/+3
Rename `CoerceSized` to `DispatchFromDyn`, and reverse the direction so that, for example, you write ``` impl<T: Unsize<U>, U> DispatchFromDyn<*const U> for *const T {} ``` instead of ``` impl<T: Unsize<U>, U> DispatchFromDyn<*const T> for *const U {} ``` this way the trait is really just a subset of `CoerceUnsized`. The checks in object_safety.rs are updated for the new trait, and some documentation and method names in there are updated for the new trait name — e.g. `receiver_is_coercible` is now called `receiver_is_dispatchable`. Since the trait now works in the opposite direction, some code had to updated here for that too. I did not update the error messages for invalid `CoerceSized` (now `DispatchFromDyn`) implementations, except to find/replace `CoerceSized` with `DispatchFromDyn`. Will ask for suggestions in the PR thread.
2018-11-01Add CoerceSized impls throughout libstdMichael Hewson-1/+8
This will make receiver types like `Rc<Self>` and `Pin<&mut Self>` object-safe.
2018-10-23fix typos in various placesMatthias Krüger-1/+1
2018-09-26Remove useless lifetimes from `Pin` `impl`s.Alexander Ronald Altman-5/+5
2018-09-18Cleanup Deref impls and add ?Sized bound to &mut T implsTaylor Cramer-4/+4
2018-09-17Cleanup and fix method resolution issueTaylor Cramer-49/+93