From 96983fc53009a2a2d2f93e7cec012634800be1fa Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Wed, 21 Aug 2019 06:25:37 +0000 Subject: [PATCH] Add comment to avoid accidentally remove the changes. --- src/libcore/cmp.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index 74e9ceb510a9..167a9dd1c362 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -1012,6 +1012,8 @@ mod impls { impl Ord for $t { #[inline] fn cmp(&self, other: &$t) -> Ordering { + // The order here is important to generate more optimal assembly. + // See for more info. if *self < *other { Less } else if *self > *other { Greater } else { Equal }