Skip to content

Commit a9146ce

Browse files
Rollup merge of #119949 - clubby789:spec-newtype-comment, r=nnethercote
Add note on SpecOptionPartialEq to `newtype_index` https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/.60SpecOptionPartialEq.60.20error r? `@nnethercote`
2 parents 5ad0ed5 + 4ca6342 commit a9146ce

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

compiler/rustc_index_macros/src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ mod newtype;
3131
/// - `#[max = 0xFFFF_FFFD]`: specifies the max value, which allows niche
3232
/// optimizations. The default max value is 0xFFFF_FF00.
3333
/// - `#[gate_rustc_only]`: makes parts of the generated code nightly-only.
34+
///
35+
/// `SpecOptionPartialEq` is specialized by this macro, so using it requires enabling
36+
/// `#![feature(min_specialization)]` for the crate.
3437
#[proc_macro]
3538
#[cfg_attr(
3639
feature = "nightly",

library/core/src/option.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2147,6 +2147,7 @@ impl<T: PartialEq> PartialEq for Option<T> {
21472147
///
21482148
/// Once that's fixed, `Option` should go back to deriving `PartialEq`, as
21492149
/// it used to do before <https://github.com/rust-lang/rust/pull/103556>.
2150+
/// The comment regarding this trait on the `newtype_index` macro should be removed if this is done.
21502151
#[unstable(feature = "spec_option_partial_eq", issue = "none", reason = "exposed only for rustc")]
21512152
#[doc(hidden)]
21522153
pub trait SpecOptionPartialEq: Sized {

0 commit comments

Comments
 (0)