Skip to content

Commit 90b5784

Browse files
committed
Fix documentation links
1 parent 5fd0240 commit 90b5784

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

library/alloc/src/option.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@
8888
//! [^extern_fn]: this remains true for any other ABI: `extern "abi" fn` (_e.g._, `extern "system" fn`)
8989
//!
9090
//! [`Box<U>`]: ../../std/boxed/struct.Box.html
91-
//! [`num::NonZero*`]: crate::num
92-
//! [`ptr::NonNull<U>`]: crate::ptr::NonNull
91+
//! [`num::NonZero*`]: core::num
92+
//! [`ptr::NonNull<U>`]: core::ptr::NonNull
9393
//!
9494
//! This is called the "null pointer optimization" or NPO.
9595
//!
@@ -98,6 +98,8 @@
9898
//! from `Some::<T>(_)` to `T` (but transmuting `None::<T>` to `T`
9999
//! is undefined behaviour).
100100
//!
101+
//! [`mem::transmute`]: core::mem::transmute
102+
//!
101103
//! # Method overview
102104
//!
103105
//! In addition to working with pattern matching, [`Option`] provides a wide
@@ -126,13 +128,14 @@
126128
//!
127129
//! [&]: reference "shared reference"
128130
//! [&mut]: reference "mutable reference"
129-
//! [Target]: Deref::Target "ops::Deref::Target"
131+
//! [Target]: core::ops::Deref::Target "ops::Deref::Target"
130132
//! [`as_deref`]: Option::as_deref
131133
//! [`as_deref_mut`]: Option::as_deref_mut
132134
//! [`as_mut`]: Option::as_mut
133135
//! [`as_pin_mut`]: Option::as_pin_mut
134136
//! [`as_pin_ref`]: Option::as_pin_ref
135137
//! [`as_ref`]: Option::as_ref
138+
//! [Pin]: core::pin::Pin
136139
//!
137140
//! ## Extracting the contained value
138141
//!
@@ -314,8 +317,8 @@
314317
//! the [`Option`] is [`None`].
315318
//!
316319
//! [`Some(v)`]: Some
317-
//! [`empty()`]: crate::iter::empty
318-
//! [`once(v)`]: crate::iter::once
320+
//! [`empty()`]: core::iter::empty
321+
//! [`once(v)`]: core::iter::once
319322
//!
320323
//! Iterators over [`Option<T>`] come in three types:
321324
//!
@@ -366,8 +369,8 @@
366369
//! we can't return `impl Iterator` anymore because the concrete types of
367370
//! the return values differ.
368371
//!
369-
//! [`empty()`]: crate::iter::empty
370-
//! [`once()`]: crate::iter::once
372+
//! [`empty()`]: core::iter::empty
373+
//! [`once()`]: core::iter::once
371374
//!
372375
//! ```compile_fail,E0308
373376
//! # use std::iter::{empty, once};

0 commit comments

Comments
 (0)