Skip to content

Commit 3e9d1e4

Browse files
committed
Link to the LLVM issue from a comment on SpecOptionPartialEq
1 parent 3122db7 commit 3e9d1e4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/core/src/option.rs

+6
Original file line numberDiff line numberDiff line change
@@ -2090,6 +2090,12 @@ impl<T: PartialEq> PartialEq for Option<T> {
20902090
}
20912091
}
20922092

2093+
/// This specialization trait is a workaround for LLVM not currently (2023-01)
2094+
/// being able to optimize this itself, even though Alive confirms that it would
2095+
/// be legal to do so: <https://github.com/llvm/llvm-project/issues/52622>
2096+
///
2097+
/// Once that's fixed, `Option` should go back to deriving `PartialEq`, as
2098+
/// it used to do before <https://github.com/rust-lang/rust/pull/103556>.
20932099
#[unstable(feature = "spec_option_partial_eq", issue = "none", reason = "exposed only for rustc")]
20942100
#[doc(hidden)]
20952101
pub trait SpecOptionPartialEq: Sized {

0 commit comments

Comments
 (0)