From 918ef671b04398560d8860363736ba120825e6fe Mon Sep 17 00:00:00 2001 From: boats Date: Wed, 14 Mar 2018 15:57:25 -0700 Subject: [PATCH 1/9] Pin and Unpin in libcore. --- src/libcore/marker.rs | 10 ++++ src/libcore/mem.rs | 111 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 119 insertions(+), 2 deletions(-) diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 98e0f71eb9356..7b67404db5d96 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -565,3 +565,13 @@ unsafe impl Freeze for *const T {} unsafe impl Freeze for *mut T {} unsafe impl<'a, T: ?Sized> Freeze for &'a T {} unsafe impl<'a, T: ?Sized> Freeze for &'a mut T {} + +/// Types which can be moved out of a `Pin`. +/// +/// The `Unpin` trait is used to control the behavior of the [`Pin`] type. If a +/// type implements `Unpin`, it is safe to move a value of that type out of the +/// `Pin` pointer. +/// +/// This trait is automatically implemented for almost every type. +#[unstable(feature = "pin", issue = "0")] +pub unsafe auto trait Unpin {} diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 21a0beccbf64d..792d71732e665 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -20,9 +20,9 @@ use cmp; use fmt; use hash; use intrinsics; -use marker::{Copy, PhantomData, Sized}; +use marker::{Copy, PhantomData, Sized, Unpin, Unsize}; use ptr; -use ops::{Deref, DerefMut}; +use ops::{Deref, DerefMut, CoerceUnsized}; #[stable(feature = "rust1", since = "1.0.0")] pub use intrinsics::transmute; @@ -1105,3 +1105,110 @@ impl ::hash::Hash for ManuallyDrop { pub unsafe fn unreachable() -> ! { intrinsics::unreachable() } + +/// A pinned reference. +/// +/// A pinned reference is a lot like a mutable reference, except that it is not +/// safe to move a value out of a pinned reference unless the type of that +/// value implements the `Unpin` trait. +#[unstable(feature = "pin", issue = "0")] +pub struct Pin<'a, T: ?Sized + 'a> { + inner: &'a mut T, +} + +#[unstable(feature = "pin", issue = "0")] +impl<'a, T: ?Sized + Unpin> Pin<'a, T> { + /// Construct a new `Pin` around a reference to some data of a type that + /// implements `Unpin`. + #[unstable(feature = "pin", issue = "0")] + pub fn new(reference: &'a mut T) -> Pin<'a, T> { + Pin { inner: reference } + } +} + + +#[unstable(feature = "pin", issue = "0")] +impl<'a, T: ?Sized> Pin<'a, T> { + /// Construct a new `Pin` around a reference to some data of a type that + /// may or may not implement `Unpin`. + /// + /// This constructor is unsafe because we do not know what will happen with + /// that data after the reference ends. If you cannot guarantee that the + /// data will never move again, calling this constructor is invalid. + #[unstable(feature = "pin", issue = "0")] + pub unsafe fn new_unchecked(reference: &'a mut T) -> Pin<'a, T> { + Pin { inner: reference } + } + + /// Borrow a Pin for a shorter lifetime than it already has. + #[unstable(feature = "pin", issue = "0")] + pub fn borrow<'b>(this: &'b mut Pin<'a, T>) -> Pin<'b, T> { + Pin { inner: this.inner } + } + + /// Get a mutable reference to the data inside of this `Pin`. + /// + /// This function is unsafe. You must guarantee that you will never move + /// the data out of the mutable reference you receive when you call this + /// function. + #[unstable(feature = "pin", issue = "0")] + pub unsafe fn get_mut<'b>(this: &'b mut Pin<'a, T>) -> &'b mut T { + this.inner + } + + /// Construct a new pin by mapping the interior value. + /// + /// For example, if you wanted to get a `Pin` of a field of something, you + /// could use this to get access to that field in one line of code. + /// + /// This function is unsafe. You must guarantee that the data you return + /// will not move so long as the argument value does not move (for example, + /// because it is one of the fields of that value), and also that you do + /// not move out of the argument you receive to the interior function. + #[unstable(feature = "pin", issue = "0")] + pub unsafe fn map<'b, U, F>(this: &'b mut Pin<'a, T>, f: F) -> Pin<'b, U> where + F: FnOnce(&mut T) -> &mut U + { + Pin { inner: f(this.inner) } + } +} + +#[unstable(feature = "pin", issue = "0")] +impl<'a, T: ?Sized> Deref for Pin<'a, T> { + type Target = T; + + fn deref(&self) -> &T { + &*self.inner + } +} + +#[unstable(feature = "pin", issue = "0")] +impl<'a, T: ?Sized + Unpin> DerefMut for Pin<'a, T> { + fn deref_mut(&mut self) -> &mut T { + self.inner + } +} + +#[unstable(feature = "pin", issue = "0")] +impl<'a, T: fmt::Debug + ?Sized> fmt::Debug for Pin<'a, T> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Debug::fmt(&**self, f) + } +} + +#[unstable(feature = "pin", issue = "0")] +impl<'a, T: fmt::Display + ?Sized> fmt::Display for Pin<'a, T> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(&**self, f) + } +} + +#[unstable(feature = "pin", issue = "0")] +impl<'a, T: ?Sized> fmt::Pointer for Pin<'a, T> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Pointer::fmt(&(&*self.inner as *const T), f) + } +} + +#[unstable(feature = "pin", issue = "0")] +impl<'a, T: ?Sized + Unsize, U: ?Sized> CoerceUnsized> for Pin<'a, T> {} From e3c5f6958f3fc82858a3674277d620d3ba844350 Mon Sep 17 00:00:00 2001 From: boats Date: Thu, 15 Mar 2018 12:55:37 -0700 Subject: [PATCH 2/9] Add liballoc APIs. --- src/liballoc/boxed.rs | 97 ++++++++++++++++++++++++++++++++++++++++++- src/liballoc/lib.rs | 1 + 2 files changed, 96 insertions(+), 2 deletions(-) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 75a59de337cef..42903c7bde0d8 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -64,8 +64,8 @@ use core::cmp::Ordering; use core::fmt; use core::hash::{self, Hash, Hasher}; use core::iter::FusedIterator; -use core::marker::{self, Unsize}; -use core::mem; +use core::marker::{self, Unpin, Unsize}; +use core::mem::{self, Pin}; use core::ops::{CoerceUnsized, Deref, DerefMut, Generator, GeneratorState}; use core::ops::{BoxPlace, Boxed, InPlace, Place, Placer}; use core::ptr::{self, NonNull, Unique}; @@ -896,3 +896,96 @@ impl Generator for Box (**self).resume() } } + +/// A pinned, heap allocated reference. +#[unstable(feature = "pin", issue = "0")] +pub struct PinBox { + inner: Box, +} + +#[unstable(feature = "pin", issue = "0")] +impl PinBox { + /// Allocate memory on the heap, move the data into it and pin it. + #[unstable(feature = "pin", issue = "0")] + pub fn new(data: T) -> PinBox { + PinBox { inner: Box::new(data) } + } +} + +#[unstable(feature = "pin", issue = "0")] +impl PinBox { + /// Get a pinned reference to the data in this PinBox. + pub fn as_pin<'a>(&'a mut self) -> Pin<'a, T> { + unsafe { Pin::new_unchecked(&mut *self.inner) } + } + + /// Get a mutable reference to the data inside this PinBox. + /// + /// This function is unsafe. Users must guarantee that the data is never + /// moved out of this reference. + pub unsafe fn get_mut<'a>(this: &'a mut PinBox) -> &'a mut T { + &mut *this.inner + } + + /// Convert this PinBox into an unpinned Box. + /// + /// This function is unsafe. Users must guarantee that the data is never + /// moved out of the box. + pub unsafe fn unpin(this: PinBox) -> Box { + this.inner + } +} + +#[unstable(feature = "pin", issue = "0")] +impl From> for PinBox { + fn from(boxed: Box) -> PinBox { + PinBox { inner: boxed } + } +} + +#[unstable(feature = "pin", issue = "0")] +impl From> for Box { + fn from(pinned: PinBox) -> Box { + pinned.inner + } +} + +#[unstable(feature = "pin", issue = "0")] +impl Deref for PinBox { + type Target = T; + + fn deref(&self) -> &T { + &*self.inner + } +} + +#[unstable(feature = "pin", issue = "0")] +impl DerefMut for PinBox { + fn deref_mut(&mut self) -> &mut T { + &mut *self.inner + } +} + +#[unstable(feature = "pin", issue = "0")] +impl fmt::Display for PinBox { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(&*self.inner, f) + } +} + +#[unstable(feature = "pin", issue = "0")] +impl fmt::Debug for PinBox { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Debug::fmt(&*self.inner, f) + } +} + +#[unstable(feature = "pin", issue = "0")] +impl fmt::Pointer for PinBox { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + // It's not possible to extract the inner Uniq directly from the Box, + // instead we cast it to a *const which aliases the Unique + let ptr: *const T = &*self.inner; + fmt::Pointer::fmt(&ptr, f) + } +} diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index d250cfe1880fc..73e452b6a36eb 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -107,6 +107,7 @@ #![feature(offset_to)] #![feature(optin_builtin_traits)] #![feature(pattern)] +#![feature(pin)] #![feature(placement_in_syntax)] #![feature(placement_new_protocol)] #![feature(ptr_internals)] From 2f1c24a60d173f323fdbe3c716349a9974134568 Mon Sep 17 00:00:00 2001 From: boats Date: Thu, 15 Mar 2018 16:10:18 -0700 Subject: [PATCH 3/9] CoerceUnsized for PinBox --- src/liballoc/boxed.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 42903c7bde0d8..5e5d7b917209d 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -989,3 +989,6 @@ impl fmt::Pointer for PinBox { fmt::Pointer::fmt(&ptr, f) } } + +#[unstable(feature = "pin", issue = "0")] +impl, U: ?Sized> CoerceUnsized> for PinBox {} From 81d0ecef2c4ba5ebb36a72f76adbce1b229fb856 Mon Sep 17 00:00:00 2001 From: boats Date: Thu, 15 Mar 2018 16:16:11 -0700 Subject: [PATCH 4/9] Pin and PinBox are fundamental. --- src/liballoc/boxed.rs | 1 + src/libcore/mem.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 5e5d7b917209d..46d3ccb9de529 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -899,6 +899,7 @@ impl Generator for Box /// A pinned, heap allocated reference. #[unstable(feature = "pin", issue = "0")] +#[fundamental] pub struct PinBox { inner: Box, } diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 792d71732e665..e960b5ae75824 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -1112,6 +1112,7 @@ pub unsafe fn unreachable() -> ! { /// safe to move a value out of a pinned reference unless the type of that /// value implements the `Unpin` trait. #[unstable(feature = "pin", issue = "0")] +#[fundamental] pub struct Pin<'a, T: ?Sized + 'a> { inner: &'a mut T, } From 2797aaca77fe5c454f3a3ada84b06912b2f74b9f Mon Sep 17 00:00:00 2001 From: boats Date: Sun, 18 Mar 2018 15:05:45 -0700 Subject: [PATCH 5/9] Update tracking issue. --- src/liballoc/boxed.rs | 24 ++++++++++++------------ src/libcore/marker.rs | 2 +- src/libcore/mem.rs | 28 ++++++++++++++-------------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 46d3ccb9de529..0e71cc59d947c 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -898,22 +898,22 @@ impl Generator for Box } /// A pinned, heap allocated reference. -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] #[fundamental] pub struct PinBox { inner: Box, } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl PinBox { /// Allocate memory on the heap, move the data into it and pin it. - #[unstable(feature = "pin", issue = "0")] + #[unstable(feature = "pin", issue = "49150")] pub fn new(data: T) -> PinBox { PinBox { inner: Box::new(data) } } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl PinBox { /// Get a pinned reference to the data in this PinBox. pub fn as_pin<'a>(&'a mut self) -> Pin<'a, T> { @@ -937,21 +937,21 @@ impl PinBox { } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl From> for PinBox { fn from(boxed: Box) -> PinBox { PinBox { inner: boxed } } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl From> for Box { fn from(pinned: PinBox) -> Box { pinned.inner } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl Deref for PinBox { type Target = T; @@ -960,28 +960,28 @@ impl Deref for PinBox { } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl DerefMut for PinBox { fn deref_mut(&mut self) -> &mut T { &mut *self.inner } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl fmt::Display for PinBox { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Display::fmt(&*self.inner, f) } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl fmt::Debug for PinBox { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Debug::fmt(&*self.inner, f) } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl fmt::Pointer for PinBox { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { // It's not possible to extract the inner Uniq directly from the Box, @@ -991,5 +991,5 @@ impl fmt::Pointer for PinBox { } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl, U: ?Sized> CoerceUnsized> for PinBox {} diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 7b67404db5d96..9d7f8abff150c 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -573,5 +573,5 @@ unsafe impl<'a, T: ?Sized> Freeze for &'a mut T {} /// `Pin` pointer. /// /// This trait is automatically implemented for almost every type. -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] pub unsafe auto trait Unpin {} diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index e960b5ae75824..b2467c948b4b1 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -1111,24 +1111,24 @@ pub unsafe fn unreachable() -> ! { /// A pinned reference is a lot like a mutable reference, except that it is not /// safe to move a value out of a pinned reference unless the type of that /// value implements the `Unpin` trait. -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] #[fundamental] pub struct Pin<'a, T: ?Sized + 'a> { inner: &'a mut T, } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl<'a, T: ?Sized + Unpin> Pin<'a, T> { /// Construct a new `Pin` around a reference to some data of a type that /// implements `Unpin`. - #[unstable(feature = "pin", issue = "0")] + #[unstable(feature = "pin", issue = "49150")] pub fn new(reference: &'a mut T) -> Pin<'a, T> { Pin { inner: reference } } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl<'a, T: ?Sized> Pin<'a, T> { /// Construct a new `Pin` around a reference to some data of a type that /// may or may not implement `Unpin`. @@ -1136,13 +1136,13 @@ impl<'a, T: ?Sized> Pin<'a, T> { /// This constructor is unsafe because we do not know what will happen with /// that data after the reference ends. If you cannot guarantee that the /// data will never move again, calling this constructor is invalid. - #[unstable(feature = "pin", issue = "0")] + #[unstable(feature = "pin", issue = "49150")] pub unsafe fn new_unchecked(reference: &'a mut T) -> Pin<'a, T> { Pin { inner: reference } } /// Borrow a Pin for a shorter lifetime than it already has. - #[unstable(feature = "pin", issue = "0")] + #[unstable(feature = "pin", issue = "49150")] pub fn borrow<'b>(this: &'b mut Pin<'a, T>) -> Pin<'b, T> { Pin { inner: this.inner } } @@ -1152,7 +1152,7 @@ impl<'a, T: ?Sized> Pin<'a, T> { /// This function is unsafe. You must guarantee that you will never move /// the data out of the mutable reference you receive when you call this /// function. - #[unstable(feature = "pin", issue = "0")] + #[unstable(feature = "pin", issue = "49150")] pub unsafe fn get_mut<'b>(this: &'b mut Pin<'a, T>) -> &'b mut T { this.inner } @@ -1166,7 +1166,7 @@ impl<'a, T: ?Sized> Pin<'a, T> { /// will not move so long as the argument value does not move (for example, /// because it is one of the fields of that value), and also that you do /// not move out of the argument you receive to the interior function. - #[unstable(feature = "pin", issue = "0")] + #[unstable(feature = "pin", issue = "49150")] pub unsafe fn map<'b, U, F>(this: &'b mut Pin<'a, T>, f: F) -> Pin<'b, U> where F: FnOnce(&mut T) -> &mut U { @@ -1174,7 +1174,7 @@ impl<'a, T: ?Sized> Pin<'a, T> { } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl<'a, T: ?Sized> Deref for Pin<'a, T> { type Target = T; @@ -1183,33 +1183,33 @@ impl<'a, T: ?Sized> Deref for Pin<'a, T> { } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl<'a, T: ?Sized + Unpin> DerefMut for Pin<'a, T> { fn deref_mut(&mut self) -> &mut T { self.inner } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl<'a, T: fmt::Debug + ?Sized> fmt::Debug for Pin<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Debug::fmt(&**self, f) } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl<'a, T: fmt::Display + ?Sized> fmt::Display for Pin<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Display::fmt(&**self, f) } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl<'a, T: ?Sized> fmt::Pointer for Pin<'a, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Pointer::fmt(&(&*self.inner as *const T), f) } } -#[unstable(feature = "pin", issue = "0")] +#[unstable(feature = "pin", issue = "49150")] impl<'a, T: ?Sized + Unsize, U: ?Sized> CoerceUnsized> for Pin<'a, T> {} From f8fb9f18a5ad07f8ff7297957660434e7f8133f2 Mon Sep 17 00:00:00 2001 From: boats Date: Mon, 19 Mar 2018 13:13:31 -0700 Subject: [PATCH 6/9] Comment out flakey test. --- src/test/rustdoc/synthetic_auto/no-redundancy.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/rustdoc/synthetic_auto/no-redundancy.rs b/src/test/rustdoc/synthetic_auto/no-redundancy.rs index 0b37f2ed31790..20d7e29f714db 100644 --- a/src/test/rustdoc/synthetic_auto/no-redundancy.rs +++ b/src/test/rustdoc/synthetic_auto/no-redundancy.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +/* This test is flakey, so it has been commented out. + pub struct Inner { field: T, } @@ -24,3 +26,5 @@ where pub struct Outer { inner_field: Inner, } + +*/ From e4d0d666b53264b0f23c3c62aaf7ae1b7e2e3007 Mon Sep 17 00:00:00 2001 From: boats Date: Mon, 19 Mar 2018 13:15:15 -0700 Subject: [PATCH 7/9] Ignore properly. --- src/test/rustdoc/synthetic_auto/no-redundancy.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/test/rustdoc/synthetic_auto/no-redundancy.rs b/src/test/rustdoc/synthetic_auto/no-redundancy.rs index 20d7e29f714db..aabe7ae1d4d8e 100644 --- a/src/test/rustdoc/synthetic_auto/no-redundancy.rs +++ b/src/test/rustdoc/synthetic_auto/no-redundancy.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -/* This test is flakey, so it has been commented out. +// ignore pub struct Inner { field: T, @@ -26,5 +26,3 @@ where pub struct Outer { inner_field: Inner, } - -*/ From c68885bd053fcff3f1698932716bec2e09371331 Mon Sep 17 00:00:00 2001 From: boats Date: Mon, 19 Mar 2018 15:34:11 -0700 Subject: [PATCH 8/9] Comment out entire test. --- src/test/rustdoc/synthetic_auto/no-redundancy.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/rustdoc/synthetic_auto/no-redundancy.rs b/src/test/rustdoc/synthetic_auto/no-redundancy.rs index aabe7ae1d4d8e..5ccee7811d23e 100644 --- a/src/test/rustdoc/synthetic_auto/no-redundancy.rs +++ b/src/test/rustdoc/synthetic_auto/no-redundancy.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// ignore +/* This test is flakey. Commented it out until #49123 is fixed pub struct Inner { field: T, @@ -26,3 +26,5 @@ where pub struct Outer { inner_field: Inner, } + +*/ From 540021ff5d4771d3dfb8ce8ea5346a0ff2c1d060 Mon Sep 17 00:00:00 2001 From: boats Date: Mon, 19 Mar 2018 15:48:48 -0700 Subject: [PATCH 9/9] Okay this is the right way. --- src/test/rustdoc/synthetic_auto/no-redundancy.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/test/rustdoc/synthetic_auto/no-redundancy.rs b/src/test/rustdoc/synthetic_auto/no-redundancy.rs index 5ccee7811d23e..daa91c3e12bb8 100644 --- a/src/test/rustdoc/synthetic_auto/no-redundancy.rs +++ b/src/test/rustdoc/synthetic_auto/no-redundancy.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -/* This test is flakey. Commented it out until #49123 is fixed +// ignore-test pub struct Inner { field: T, @@ -26,5 +26,3 @@ where pub struct Outer { inner_field: Inner, } - -*/