We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
assert!()
1 parent 867d39c commit 1821bfaCopy full SHA for 1821bfa
library/core/src/option.rs
@@ -642,7 +642,7 @@ impl<T> Option<T> {
642
/// assert_eq!(x.is_none(), true);
643
/// ```
644
#[must_use = "if you intended to assert that this doesn't have a value, consider \
645
- `.and_then(|_| panic!(\"`Option` had a value when expected `None`\"))` instead"]
+ wrapping this in an `assert!()` instead"]
646
#[inline]
647
#[stable(feature = "rust1", since = "1.0.0")]
648
#[rustc_const_stable(feature = "const_option_basics", since = "1.48.0")]
0 commit comments