|
88 | 88 | //! [^extern_fn]: this remains true for any other ABI: `extern "abi" fn` (_e.g._, `extern "system" fn`) |
89 | 89 | //! |
90 | 90 | //! [`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 |
93 | 93 | //! |
94 | 94 | //! This is called the "null pointer optimization" or NPO. |
95 | 95 | //! |
|
98 | 98 | //! from `Some::<T>(_)` to `T` (but transmuting `None::<T>` to `T` |
99 | 99 | //! is undefined behaviour). |
100 | 100 | //! |
| 101 | +//! [`mem::transmute`]: core::mem::transmute |
| 102 | +//! |
101 | 103 | //! # Method overview |
102 | 104 | //! |
103 | 105 | //! In addition to working with pattern matching, [`Option`] provides a wide |
|
126 | 128 | //! |
127 | 129 | //! [&]: reference "shared reference" |
128 | 130 | //! [&mut]: reference "mutable reference" |
129 | | -//! [Target]: Deref::Target "ops::Deref::Target" |
| 131 | +//! [Target]: core::ops::Deref::Target "ops::Deref::Target" |
130 | 132 | //! [`as_deref`]: Option::as_deref |
131 | 133 | //! [`as_deref_mut`]: Option::as_deref_mut |
132 | 134 | //! [`as_mut`]: Option::as_mut |
133 | 135 | //! [`as_pin_mut`]: Option::as_pin_mut |
134 | 136 | //! [`as_pin_ref`]: Option::as_pin_ref |
135 | 137 | //! [`as_ref`]: Option::as_ref |
| 138 | +//! [Pin]: core::pin::Pin |
136 | 139 | //! |
137 | 140 | //! ## Extracting the contained value |
138 | 141 | //! |
|
314 | 317 | //! the [`Option`] is [`None`]. |
315 | 318 | //! |
316 | 319 | //! [`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 |
319 | 322 | //! |
320 | 323 | //! Iterators over [`Option<T>`] come in three types: |
321 | 324 | //! |
|
366 | 369 | //! we can't return `impl Iterator` anymore because the concrete types of |
367 | 370 | //! the return values differ. |
368 | 371 | //! |
369 | | -//! [`empty()`]: crate::iter::empty |
370 | | -//! [`once()`]: crate::iter::once |
| 372 | +//! [`empty()`]: core::iter::empty |
| 373 | +//! [`once()`]: core::iter::once |
371 | 374 | //! |
372 | 375 | //! ```compile_fail,E0308 |
373 | 376 | //! # use std::iter::{empty, once}; |
|
0 commit comments