1
Fork 0

update docs for option to crossreference to the result docs

This commit is contained in:
Jane Lusby 2022-04-15 10:24:34 -07:00
parent 80c362b92b
commit 5d98acb19c
2 changed files with 10 additions and 7 deletions

View file

@ -708,6 +708,9 @@ impl<T> Option<T> {
/// let x: Option<&str> = None;
/// x.expect("fruits are healthy"); // panics with `fruits are healthy`
/// ```
///
/// **Note**: Please refer to the documentation on [`Result::expect`] for further information
/// on common message styles.
#[inline]
#[track_caller]
#[stable(feature = "rust1", since = "1.0.0")]