Skip to content
Merged
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b88bcf0
Update bundled OpenSSL to 1.1.1d
alexcrichton Sep 11, 2019
68b1a87
Various refactorings to clean up nll diagnostics
mark-i-m Sep 12, 2019
23db450
minor fixes
mark-i-m Sep 12, 2019
5b09358
update tests
mark-i-m Sep 12, 2019
2a774b1
address Centril's comments
mark-i-m Sep 14, 2019
04b1111
Name index variables consistently.
nnethercote Sep 16, 2019
43c0d2c
Redefine `NodeIndex` as a `newtype_index!`.
nnethercote Sep 16, 2019
1936e44
Factor out repeated `self.nodes[i]` expressions.
nnethercote Sep 16, 2019
3fda957
Remove out-of-date comments.
nnethercote Sep 16, 2019
ac061dc
Fix some out-of-date names of things in comments.
nnethercote Sep 16, 2019
6391ef4
Fix incorrect comment about contents of a `Node`.
nnethercote Sep 16, 2019
e2492b7
Add comments about `waiting_cache`.
nnethercote Sep 16, 2019
6e48053
Use iterators in `error_at` and `process_cycle`.
nnethercote Sep 16, 2019
f22bb2e
Use `retain` for `waiting_cache` in `apply_rewrites()`.
nnethercote Sep 16, 2019
201afa6
Minor comment tweaks.
nnethercote Sep 16, 2019
4ecd94e
Move `impl Node` just after `struct Node`.
nnethercote Sep 16, 2019
0a985f2
Tweak unsatisfied HRTB errors
estebank Sep 2, 2019
3a046ff
Elide lifetimes in `Pin<&(mut) Self>`
taiki-e Sep 16, 2019
076e0ce
Use shorthand syntax in the self parameter of methods of Pin
taiki-e Sep 16, 2019
3edc644
Rollup merge of #64085 - estebank:hrtb-errors, r=oli-obk
Centril Sep 17, 2019
aeb32f0
Rollup merge of #64380 - alexcrichton:update-openssl, r=Mark-Simulacrum
Centril Sep 17, 2019
69e93e8
Rollup merge of #64416 - mark-i-m:region-naming-ctx, r=estebank
Centril Sep 17, 2019
1e3b57e
Rollup merge of #64500 - nnethercote:ObligForest-fixups, r=nikomatsakis
Centril Sep 17, 2019
52fa593
Rollup merge of #64530 - taiki-e:docs-pin-lifetimes, r=Centril
Centril Sep 17, 2019
a1fd9ba
Rollup merge of #64531 - taiki-e:pin-self, r=Centril
Centril Sep 17, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/libcore/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ impl<P: Deref> Pin<P> {
/// ruled out by the contract of `Pin::new_unchecked`.
#[stable(feature = "pin", since = "1.33.0")]
#[inline(always)]
pub fn as_ref(self: &Pin<P>) -> Pin<&P::Target> {
pub fn as_ref(&self) -> Pin<&P::Target> {
unsafe { Pin::new_unchecked(&*self.pointer) }
}

Expand Down Expand Up @@ -586,7 +586,7 @@ impl<P: DerefMut> Pin<P> {
/// ruled out by the contract of `Pin::new_unchecked`.
#[stable(feature = "pin", since = "1.33.0")]
#[inline(always)]
pub fn as_mut(self: &mut Pin<P>) -> Pin<&mut P::Target> {
pub fn as_mut(&mut self) -> Pin<&mut P::Target> {
unsafe { Pin::new_unchecked(&mut *self.pointer) }
}

Expand All @@ -596,7 +596,7 @@ impl<P: DerefMut> Pin<P> {
/// run before being overwritten, so no pinning guarantee is violated.
#[stable(feature = "pin", since = "1.33.0")]
#[inline(always)]
pub fn set(self: &mut Pin<P>, value: P::Target)
pub fn set(&mut self, value: P::Target)
where
P::Target: Sized,
{
Expand All @@ -621,7 +621,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
///
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
#[stable(feature = "pin", since = "1.33.0")]
pub unsafe fn map_unchecked<U, F>(self: Pin<&'a T>, func: F) -> Pin<&'a U> where
pub unsafe fn map_unchecked<U, F>(self, func: F) -> Pin<&'a U> where
F: FnOnce(&T) -> &U,
{
let pointer = &*self.pointer;
Expand All @@ -648,7 +648,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
/// ["pinning projections"]: ../../std/pin/index.html#projections-and-structural-pinning
#[stable(feature = "pin", since = "1.33.0")]
#[inline(always)]
pub fn get_ref(self: Pin<&'a T>) -> &'a T {
pub fn get_ref(self) -> &'a T {
self.pointer
}
}
Expand All @@ -657,7 +657,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
/// Converts this `Pin<&mut T>` into a `Pin<&T>` with the same lifetime.
#[stable(feature = "pin", since = "1.33.0")]
#[inline(always)]
pub fn into_ref(self: Pin<&'a mut T>) -> Pin<&'a T> {
pub fn into_ref(self) -> Pin<&'a T> {
Pin { pointer: self.pointer }
}

Expand All @@ -672,7 +672,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
/// with the same lifetime as the original `Pin`.
#[stable(feature = "pin", since = "1.33.0")]
#[inline(always)]
pub fn get_mut(self: Pin<&'a mut T>) -> &'a mut T
pub fn get_mut(self) -> &'a mut T
where T: Unpin,
{
self.pointer
Expand All @@ -690,7 +690,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
/// instead.
#[stable(feature = "pin", since = "1.33.0")]
#[inline(always)]
pub unsafe fn get_unchecked_mut(self: Pin<&'a mut T>) -> &'a mut T {
pub unsafe fn get_unchecked_mut(self) -> &'a mut T {
self.pointer
}

Expand All @@ -710,7 +710,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
///
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
#[stable(feature = "pin", since = "1.33.0")]
pub unsafe fn map_unchecked_mut<U, F>(self: Pin<&'a mut T>, func: F) -> Pin<&'a mut U> where
pub unsafe fn map_unchecked_mut<U, F>(self, func: F) -> Pin<&'a mut U> where
F: FnOnce(&mut T) -> &mut U,
{
let pointer = Pin::get_unchecked_mut(self);
Expand Down