Link the reference about undefined behavior
Suggested-by: Mara Bos <m-ou.se@m-ou.se> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
76299b3f42
commit
0140dacabb
@ -433,7 +433,9 @@ pub fn unwrap_or_else<F: FnOnce() -> T>(self, f: F) -> T {
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// Undefined behavior if the value is [`None`].
|
||||
/// Calling this method on [`None`] is *[undefined behavior]*.
|
||||
///
|
||||
/// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -827,7 +827,9 @@ pub fn unwrap_or_else<F: FnOnce(E) -> T>(self, op: F) -> T {
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// Undefined behavior if the value is an [`Err`].
|
||||
/// Calling this method on an [`Err`] is *[undefined behavior]*.
|
||||
///
|
||||
/// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -859,7 +861,9 @@ pub unsafe fn unwrap_unchecked(self) -> T {
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// Undefined behavior if the value is an [`Ok`].
|
||||
/// Calling this method on an [`Ok`] is *[undefined behavior]*.
|
||||
///
|
||||
/// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user