about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-10-17 07:52:17 +0900
committerGitHub <noreply@github.com>2021-10-17 07:52:17 +0900
commit9614da27cda195c2f729cab96193357124615968 (patch)
tree0cb505f644cb0a3e72d3ca24cd119be91c065660
parent4e89811b46323f432544f9c4006e40d5e5d7663f (diff)
parente41bb97c253bf99a33ee077578d876d3d6b94148 (diff)
downloadrust-9614da27cda195c2f729cab96193357124615968.tar.gz
rust-9614da27cda195c2f729cab96193357124615968.zip
Rollup merge of #89507 - lopopolo:lopopolo/ordering-repr-i8, r=joshtriplett
Add `#[repr(i8)]` to `Ordering`

Followup to #89491 to allow `Ordering` to auto-derive `AsRepr` once the proposal to add `AsRepr` (#81642) lands.

cc ``@joshtriplett``
-rw-r--r--library/core/src/cmp.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs
index 5ac9fdec0cf..7456f886ea5 100644
--- a/library/core/src/cmp.rs
+++ b/library/core/src/cmp.rs
@@ -323,6 +323,7 @@ pub struct AssertParamIsEq<T: Eq + ?Sized> {
 /// ```
 #[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")]