Skip to content

Commit f0a0065

Browse files
committed
Arbitrary self types v2: enable in bootstrap.
For now, this disables a doctest, which otherwise fails. We'll want to re-enable that later.
1 parent 72dcf08 commit f0a0065

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

library/core/src/ops/deref.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,7 @@ unsafe impl<T: ?Sized> DerefPure for &mut T {}
303303

304304
/// Indicates that a struct can be used as a method receiver.
305305
/// That is, a type can use this type as a type of `self`, like this:
306-
/// ```
307-
/// # // This is currently compile_fail because the compiler-side parts
308-
/// # // of arbitrary_self_types are not implemented
306+
/// ```ignore (trying to figure out bootstrap stuff, will be reinstated)
309307
/// use std::ops::Receiver;
310308
///
311309
/// struct SmartPointer<T>(T);
@@ -365,7 +363,6 @@ unsafe impl<T: ?Sized> DerefPure for &mut T {}
365363
/// }
366364
/// ```
367365
#[lang = "receiver"]
368-
#[cfg(not(bootstrap))]
369366
#[stable(feature = "arbitrary_self_types", since = "CURRENT_RUSTC_VERSION")]
370367
pub trait Receiver {
371368
/// The target type on which the method may be called.
@@ -375,7 +372,6 @@ pub trait Receiver {
375372
type Target: ?Sized;
376373
}
377374

378-
#[cfg(not(bootstrap))]
379375
#[stable(feature = "arbitrary_self_types", since = "CURRENT_RUSTC_VERSION")]
380376
impl<P: ?Sized, T: ?Sized> Receiver for P
381377
where

library/core/src/ops/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ pub use self::deref::DerefPure;
171171
#[cfg(bootstrap)]
172172
#[unstable(feature = "legacy_receiver_trait", issue = "none")]
173173
pub use self::deref::LegacyReceiver;
174-
#[cfg(not(bootstrap))]
175174
#[stable(feature = "arbitrary_self_types", since = "CURRENT_RUSTC_VERSION")]
176175
pub use self::deref::Receiver;
177176
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)