File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -429,9 +429,11 @@ pub fn align_of_val<T: ?Sized>(val: &T) -> usize {
429429
430430/// Returns whether dropping values of type `T` matters.
431431///
432- /// This is purely an optimization hint, and may be implemented conservatively.
433- /// For instance, always returning `true` would be a valid implementation of
434- /// this function.
432+ /// This is purely an optimization hint, and may be implemented conservatively:
433+ /// it may return `true` for types that don't actually need to be dropped.
434+ /// As such always returning `true` would be a valid implementation of
435+ /// this function. However if this function actually returns `false`, then you
436+ /// can be certain dropping `T` has no side effect.
435437///
436438/// Low level implementations of things like collections, which need to manually
437439/// drop their data, should use this function to avoid unnecessarily
You can’t perform that action at this time.
0 commit comments