From 518d348f873ac5df4ca43b36145e5556138adad3 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Fri, 17 Feb 2023 13:43:38 +0000 Subject: [PATCH] Implement `StructuralEq` for integers, `bool` and `char` (how did this work before??) --- library/core/src/marker.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index e85c0c0a688..1d33236c269 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -214,6 +214,35 @@ pub trait StructuralEq { // Empty. } +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for usize {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for u8 {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for u16 {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for u32 {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for u64 {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for u128 {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for isize {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for i8 {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for i16 {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for i32 {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for i64 {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for i128 {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for bool {} +#[unstable(feature = "structural_match", issue = "31434")] +impl StructuralEq for char {} + /// Types whose values can be duplicated simply by copying bits. /// /// By default, variable bindings have 'move semantics.' In other