From f847ff1511825224a19055f6d8646136becc15eb Mon Sep 17 00:00:00 2001 From: Jad Ghalayini Date: Mon, 8 Feb 2021 12:07:59 +0000 Subject: [PATCH] Added #[repr(transparent)] to core::cmp::Reverse --- library/core/src/cmp.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index 4a15b185a83..5bab1fb93db 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -579,6 +579,7 @@ pub fn then_with Ordering>(self, f: F) -> Ordering { /// ``` #[derive(PartialEq, Eq, Debug, Copy, Clone, Default, Hash)] #[stable(feature = "reverse_cmp_key", since = "1.19.0")] +#[repr(transparent)] pub struct Reverse(#[stable(feature = "reverse_cmp_key", since = "1.19.0")] pub T); #[stable(feature = "reverse_cmp_key", since = "1.19.0")]