Implement StructuralEq for integers, bool and char

(how did this work before??)
This commit is contained in:
Maybe Waffle 2023-02-17 13:43:38 +00:00
parent 91b61a4ad6
commit 518d348f87

View File

@ -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