From ca26dec15fb35f8e27c517baf2b147edefbb4cd6 Mon Sep 17 00:00:00 2001 From: Venus Xeon-Blonde Date: Thu, 22 Sep 2022 02:12:06 -0400 Subject: [PATCH] Add missing assertion --- library/core/src/bool.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/bool.rs b/library/core/src/bool.rs index e717d1f3524d1..db1c505ba3851 100644 --- a/library/core/src/bool.rs +++ b/library/core/src/bool.rs @@ -58,6 +58,7 @@ impl bool { /// /// // `a` is incremented once because the closure is evaluated lazily by /// // `then`. + /// assert_eq!(a, 1); /// ``` #[stable(feature = "lazy_bool_to_option", since = "1.50.0")] #[rustc_const_unstable(feature = "const_bool_to_option", issue = "91917")]