@@ -183,9 +183,9 @@ mod prim_unit { }
183
183
/// Working with raw pointers in Rust is uncommon,
184
184
/// typically limited to a few patterns.
185
185
///
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
187
187
/// 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.
189
189
///
190
190
/// # Common ways to create raw pointers
191
191
///
@@ -213,7 +213,7 @@ mod prim_unit { }
213
213
///
214
214
/// ## 2. Consume a box (`Box<T>`).
215
215
///
216
- /// The `into_raw` function consumes a box and returns
216
+ /// The [ `into_raw`] function consumes a box and returns
217
217
/// the raw pointer. It doesn't destroy `T` or deallocate any memory.
218
218
///
219
219
/// ```
@@ -227,7 +227,7 @@ mod prim_unit { }
227
227
/// }
228
228
/// ```
229
229
///
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
231
231
/// that we are done with the given value and it should be destroyed.
232
232
///
233
233
/// ## 3. Get it from C.
@@ -255,6 +255,11 @@ mod prim_unit { }
255
255
///
256
256
/// *[See also the `std::ptr` module](ptr/index.html).*
257
257
///
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
258
263
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
259
264
mod prim_pointer { }
260
265
0 commit comments