diff --git a/library/core/src/option.rs b/library/core/src/option.rs index ce29352ba1952..c94e7d73a2ae6 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -642,7 +642,7 @@ impl Option { /// assert_eq!(x.is_none(), true); /// ``` #[must_use = "if you intended to assert that this doesn't have a value, consider \ - `.and_then(|_| panic!(\"`Option` had a value when expected `None`\"))` instead"] + wrapping this in an `assert!()` instead"] #[inline] #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_stable(feature = "const_option_basics", since = "1.48.0")]