about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2019-08-21 06:25:37 +0000
committerLzu Tao <taolzu@gmail.com>2019-08-21 06:25:37 +0000
commit96983fc53009a2a2d2f93e7cec012634800be1fa (patch)
treee99f2a7151e2eda300ed956e2f87c2469e9a3fa6
parent0337cc117d3c972b7b98e5c09212d58d3d16a009 (diff)
downloadrust-96983fc53009a2a2d2f93e7cec012634800be1fa.tar.gz
rust-96983fc53009a2a2d2f93e7cec012634800be1fa.zip
Add comment to avoid accidentally remove the changes.
-rw-r--r--src/libcore/cmp.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index 74e9ceb510a..167a9dd1c36 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 <https://github.com/rust-lang/rust/issues/63758> for more info.
                     if *self < *other { Less }
                     else if *self > *other { Greater }
                     else { Equal }