From 3e9d1e40cb2a4dc1e1d303e9d9fa382c34106277 Mon Sep 17 00:00:00 2001 From: Scott McMurray Date: Fri, 27 Jan 2023 19:09:52 -0800 Subject: [PATCH] Link to the LLVM issue from a comment on `SpecOptionPartialEq` --- library/core/src/option.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 4aeb707fa6788..c43b728022d2f 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -2090,6 +2090,12 @@ impl PartialEq for Option { } } +/// This specialization trait is a workaround for LLVM not currently (2023-01) +/// being able to optimize this itself, even though Alive confirms that it would +/// be legal to do so: +/// +/// Once that's fixed, `Option` should go back to deriving `PartialEq`, as +/// it used to do before . #[unstable(feature = "spec_option_partial_eq", issue = "none", reason = "exposed only for rustc")] #[doc(hidden)] pub trait SpecOptionPartialEq: Sized {