From e41bb97c253bf99a33ee077578d876d3d6b94148 Mon Sep 17 00:00:00 2001 From: Ryan Lopopolo Date: Sun, 3 Oct 2021 20:59:54 -0700 Subject: [PATCH] Add `#[repr(i8)]` to `Ordering` Followup to #89491 to allow `Ordering` to auto-derive `AsRepr` once the proposal to add `AsRepr` (#81642) lands. --- 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 5ac9fdec0cf58..7456f886ea5d8 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -323,6 +323,7 @@ pub struct AssertParamIsEq { /// ``` #[derive(Clone, Copy, PartialEq, Debug, Hash)] #[stable(feature = "rust1", since = "1.0.0")] +#[repr(i8)] pub enum Ordering { /// An ordering where a compared value is less than another. #[stable(feature = "rust1", since = "1.0.0")]