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 @@ impl<T> Option<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 @@ impl<T, E> Result<T, E> {
|
||||
///
|
||||
/// # 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 @@ impl<T, E> Result<T, E> {
|
||||
///
|
||||
/// # 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…
x
Reference in New Issue
Block a user