File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -368,15 +368,17 @@ pub fn align_of_val<T: ?Sized>(val: &T) -> usize {
368
368
/// make a difference in release builds (where a loop that has no side-effects
369
369
/// is easily detected and eliminated), but is often a big win for debug builds.
370
370
///
371
- /// Note that `ptr:: drop_in_place` already performs this check, so if your workload
372
- /// can be reduced to some small number of drop_in_place calls, using this is
373
- /// unnecessary. In particular note that you can drop_in_place a slice, and that
371
+ /// Note that [` drop_in_place`] already performs this check, so if your workload
372
+ /// can be reduced to some small number of [` drop_in_place`] calls, using this is
373
+ /// unnecessary. In particular note that you can [` drop_in_place`] a slice, and that
374
374
/// will do a single needs_drop check for all the values.
375
375
///
376
376
/// Types like Vec therefore just `drop_in_place(&mut self[..])` without using
377
- /// needs_drop explicitly. Types like `HashMap`, on the other hand, have to drop
377
+ /// ` needs_drop` explicitly. Types like [ `HashMap`] , on the other hand, have to drop
378
378
/// values one at a time and should use this API.
379
379
///
380
+ /// [`drop_in_place`]: ../ptr/fn.drop_in_place.html
381
+ /// [`HashMap`]: ../../std/collections/struct.HashMap.html
380
382
///
381
383
/// # Examples
382
384
///
You can’t perform that action at this time.
0 commit comments