From e15621482c1b25dba5f4d2bf60f7546149edb6af Mon Sep 17 00:00:00 2001
From: Aleksey Kladov <aleksey.kladov@gmail.com>
Date: Wed, 3 Mar 2021 11:23:05 +0300
Subject: [PATCH] Clarify comparison rule

---
 docs/dev/style.md | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/docs/dev/style.md b/docs/dev/style.md
index dd71e3932a7..93ad98f20e2 100644
--- a/docs/dev/style.md
+++ b/docs/dev/style.md
@@ -769,14 +769,20 @@ fn foo() -> Option<Bar> {
 
 ## Comparisons
 
-Use `<`/`<=`, avoid `>`/`>=`.
+When doing multiple comparisons use `<`/`<=`, avoid `>`/`>=`.
 
 ```rust
 // GOOD
 assert!(lo <= x && x <= hi);
+assert!(r1 < l2 || r2 < l1);
+assert!(x < y);
+assert!(x > 0);
 
 // BAD
 assert!(x >= lo && x <= hi>);
+assert!(r1 < l2 || l1 > r2);
+assert!(y > x);
+assert!(0 > x);
 ```
 
 **Rationale:** Less-then comparisons are more intuitive, they correspond spatially to [real line](https://en.wikipedia.org/wiki/Real_line).