Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e6e8529

Browse files
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 a383775 commit e6e8529

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

‎library/core/src/ops/deref.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,8 @@ 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+
/// ```compile_fail
307+
/// # // compile_fail due to the need to run against bootstrap in CI
309308
/// use std::ops::Receiver;
310309
///
311310
/// struct SmartPointer<T>(T);
@@ -365,7 +364,6 @@ unsafe impl<T: ?Sized> DerefPure for &mut T {}
365364
/// }
366365
/// ```
367366
#[lang = "receiver"]
368-
#[cfg(not(bootstrap))]
369367
#[stable(feature = "arbitrary_self_types", since = "CURRENT_RUSTC_VERSION")]
370368
pub trait Receiver {
371369
/// The target type on which the method may be called.
@@ -375,7 +373,6 @@ pub trait Receiver {
375373
type Target: ?Sized;
376374
}
377375

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

‎library/core/src/ops/mod.rs

Lines changed: 0 additions & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /