Skip to content

Commit 003a7b6

Browse files
committed
Auto merge of #62181 - eddyb:syn-only-elision, r=<try>
[WIP] rustc: temporarily disable non-syntactic elision. This is only exists so we can do a quick crater check-only run, which we should've probably done a long time ago, but this behavior persisted undisturbed and unquestioned (possible for a good reason). r? @nikomatsakis
2 parents 6ea4036 + 4d81f33 commit 003a7b6

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/libcore/pin.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ impl<P: Deref> Pin<P> {
533533
/// ruled out by the contract of `Pin::new_unchecked`.
534534
#[stable(feature = "pin", since = "1.33.0")]
535535
#[inline(always)]
536-
pub fn as_ref(self: &Pin<P>) -> Pin<&P::Target> {
536+
pub fn as_ref(&self) -> Pin<&P::Target> {
537537
unsafe { Pin::new_unchecked(&*self.pointer) }
538538
}
539539

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

@@ -580,7 +580,7 @@ impl<P: DerefMut> Pin<P> {
580580
/// run before being overwritten, so no pinning guarantee is violated.
581581
#[stable(feature = "pin", since = "1.33.0")]
582582
#[inline(always)]
583-
pub fn set(self: &mut Pin<P>, value: P::Target)
583+
pub fn set(&mut self, value: P::Target)
584584
where
585585
P::Target: Sized,
586586
{
@@ -605,7 +605,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
605605
///
606606
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
607607
#[stable(feature = "pin", since = "1.33.0")]
608-
pub unsafe fn map_unchecked<U, F>(self: Pin<&'a T>, func: F) -> Pin<&'a U> where
608+
pub unsafe fn map_unchecked<U, F>(self, func: F) -> Pin<&'a U> where
609609
F: FnOnce(&T) -> &U,
610610
{
611611
let pointer = &*self.pointer;
@@ -632,7 +632,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
632632
/// ["pinning projections"]: ../../std/pin/index.html#projections-and-structural-pinning
633633
#[stable(feature = "pin", since = "1.33.0")]
634634
#[inline(always)]
635-
pub fn get_ref(self: Pin<&'a T>) -> &'a T {
635+
pub fn get_ref(self) -> &'a T {
636636
self.pointer
637637
}
638638
}
@@ -641,7 +641,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
641641
/// Converts this `Pin<&mut T>` into a `Pin<&T>` with the same lifetime.
642642
#[stable(feature = "pin", since = "1.33.0")]
643643
#[inline(always)]
644-
pub fn into_ref(self: Pin<&'a mut T>) -> Pin<&'a T> {
644+
pub fn into_ref(self) -> Pin<&'a T> {
645645
Pin { pointer: self.pointer }
646646
}
647647

@@ -656,7 +656,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
656656
/// with the same lifetime as the original `Pin`.
657657
#[stable(feature = "pin", since = "1.33.0")]
658658
#[inline(always)]
659-
pub fn get_mut(self: Pin<&'a mut T>) -> &'a mut T
659+
pub fn get_mut(self) -> &'a mut T
660660
where T: Unpin,
661661
{
662662
self.pointer
@@ -674,7 +674,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
674674
/// instead.
675675
#[stable(feature = "pin", since = "1.33.0")]
676676
#[inline(always)]
677-
pub unsafe fn get_unchecked_mut(self: Pin<&'a mut T>) -> &'a mut T {
677+
pub unsafe fn get_unchecked_mut(self) -> &'a mut T {
678678
self.pointer
679679
}
680680

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

src/librustc/middle/resolve_lifetime.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,8 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
21362136
| Res::Def(DefKind::Union, _)
21372137
| Res::Def(DefKind::Enum, _)
21382138
| Res::PrimTy(_) => {
2139-
return res == path.res
2139+
// HACK(eddyb) temporarily disable non-syntactic elision.
2140+
return res == path.res && false;
21402141
}
21412142
_ => {}
21422143
}

0 commit comments

Comments
 (0)