diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-07-11 10:21:29 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-07-17 15:42:54 +0000 |
| commit | 2f5722cf1bdd4ffcdf46e85ffbd97455aaeec7de (patch) | |
| tree | 12c4ab19adbb96f77be23a778d8b3a7759fc1d39 /library/core/src | |
| parent | 014bd8290f084c714995205a9116e6c035419ae6 (diff) | |
| download | rust-2f5722cf1bdd4ffcdf46e85ffbd97455aaeec7de.tar.gz rust-2f5722cf1bdd4ffcdf46e85ffbd97455aaeec7de.zip | |
Make `Option` `const PartialEq`
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/option.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 9f432758a66..da6e311ff5e 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -2243,7 +2243,8 @@ impl<'a, T> From<&'a mut Option<T>> for Option<&'a mut T> { #[stable(feature = "rust1", since = "1.0.0")] impl<T> crate::marker::StructuralPartialEq for Option<T> {} #[stable(feature = "rust1", since = "1.0.0")] -impl<T: PartialEq> PartialEq for Option<T> { +#[rustc_const_unstable(feature = "const_cmp", issue = "143800")] +impl<T: ~const PartialEq> const PartialEq for Option<T> { #[inline] fn eq(&self, other: &Self) -> bool { // Spelling out the cases explicitly optimizes better than |
