Skip to content

Commit 2715101

Browse files
Add missing urls in ptr docs
1 parent 134c4a0 commit 2715101

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/libstd/primitive_docs.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ mod prim_unit { }
183183
/// Working with raw pointers in Rust is uncommon,
184184
/// typically limited to a few patterns.
185185
///
186-
/// Use the `null` function to create null pointers, and the `is_null` method
186+
/// Use the [`null`] function to create null pointers, and the [`is_null`] method
187187
/// of the `*const T` type to check for null. The `*const T` type also defines
188-
/// the `offset` method, for pointer math.
188+
/// the [`offset`] method, for pointer math.
189189
///
190190
/// # Common ways to create raw pointers
191191
///
@@ -213,7 +213,7 @@ mod prim_unit { }
213213
///
214214
/// ## 2. Consume a box (`Box<T>`).
215215
///
216-
/// The `into_raw` function consumes a box and returns
216+
/// The [`into_raw`] function consumes a box and returns
217217
/// the raw pointer. It doesn't destroy `T` or deallocate any memory.
218218
///
219219
/// ```
@@ -227,7 +227,7 @@ mod prim_unit { }
227227
/// }
228228
/// ```
229229
///
230-
/// Note that here the call to `drop` is for clarity - it indicates
230+
/// Note that here the call to [`drop`] is for clarity - it indicates
231231
/// that we are done with the given value and it should be destroyed.
232232
///
233233
/// ## 3. Get it from C.
@@ -255,6 +255,11 @@ mod prim_unit { }
255255
///
256256
/// *[See also the `std::ptr` module](ptr/index.html).*
257257
///
258+
/// [`null`]: ../std/ptr/fn.null.html
259+
/// [`is_null`]: ../std/primitive.pointer.html#method.is_null
260+
/// [`offset`]: ../std/primitive.pointer.html#method.offset
261+
/// [`into_raw`]: ../std/boxed/struct.Box.html#method.into_raw
262+
/// [`drop`]: ../std/mem/fn.drop.html
258263
#[stable(feature = "rust1", since = "1.0.0")]
259264
mod prim_pointer { }
260265

0 commit comments

Comments
 (0)