Skip to content

Commit

Permalink
Link to the LLVM issue from a comment on SpecOptionPartialEq
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmcm committed Jan 28, 2023
1 parent 3122db7 commit 3e9d1e4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2090,6 +2090,12 @@ impl<T: PartialEq> PartialEq for Option<T> {
}
}

/// 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: <https://github.com/llvm/llvm-project/issues/52622>
///
/// 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>.
#[unstable(feature = "spec_option_partial_eq", issue = "none", reason = "exposed only for rustc")]
#[doc(hidden)]
pub trait SpecOptionPartialEq: Sized {
Expand Down

0 comments on commit 3e9d1e4

Please sign in to comment.