diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2024-01-14 00:24:39 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2024-01-14 00:24:39 +0000 |
| commit | 4ca6342eb30dfbc3fe0992de0cfc780f3992f446 (patch) | |
| tree | 42888db0b5fdc8f4bffb6b6629c6d27aa5da3a11 | |
| parent | d78329b92e8d141d19505e7c1527181c4ab87ed4 (diff) | |
| download | rust-4ca6342eb30dfbc3fe0992de0cfc780f3992f446.tar.gz rust-4ca6342eb30dfbc3fe0992de0cfc780f3992f446.zip | |
Add note on SpecOptionPartialEq to `newtype_index`
| -rw-r--r-- | compiler/rustc_index_macros/src/lib.rs | 3 | ||||
| -rw-r--r-- | library/core/src/option.rs | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_index_macros/src/lib.rs b/compiler/rustc_index_macros/src/lib.rs index ac374a41eb6..4f973c1f010 100644 --- a/compiler/rustc_index_macros/src/lib.rs +++ b/compiler/rustc_index_macros/src/lib.rs @@ -31,6 +31,9 @@ mod newtype; /// - `#[max = 0xFFFF_FFFD]`: specifies the max value, which allows niche /// optimizations. The default max value is 0xFFFF_FF00. /// - `#[gate_rustc_only]`: makes parts of the generated code nightly-only. +/// +/// `SpecOptionPartialEq` is specialized by this macro, so using it requires enabling +/// `#![feature(min_specialization)]` for the crate. #[proc_macro] #[cfg_attr( feature = "nightly", diff --git a/library/core/src/option.rs b/library/core/src/option.rs index ff435349249..781c7a91a5a 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -2147,6 +2147,7 @@ impl<T: PartialEq> PartialEq for Option<T> { /// /// Once that's fixed, `Option` should go back to deriving `PartialEq`, as /// it used to do before <https://github.com/rust-lang/rust/pull/103556>. +/// The comment regarding this trait on the `newtype_index` macro should be removed if this is done. #[unstable(feature = "spec_option_partial_eq", issue = "none", reason = "exposed only for rustc")] #[doc(hidden)] pub trait SpecOptionPartialEq: Sized { |
