From fb296d7a04ba42e723aa082d4ef9f96105dd1da0 Mon Sep 17 00:00:00 2001 From: Asger Hautop Drewsen Date: Fri, 9 Jan 2026 12:52:25 +0100 Subject: [PATCH] Use f64 NaN in documentation instead of sqrt(-1.0) --- library/core/src/cmp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index feb9c43196044..d61e1071db8b6 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -1186,7 +1186,7 @@ pub macro Ord($item:item) { /// every `a`. This isn't always the case for types that implement `PartialOrd`, for example: /// /// ``` -/// let a = f64::sqrt(-1.0); +/// let a = f64::NAN; /// assert_eq!(a <= a, false); /// ``` ///