diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-02-26 14:35:08 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-02-26 15:12:27 +0100 |
| commit | 9a6e3b900f458fd82c25e7679be2c8860aba4f22 (patch) | |
| tree | d718f67aeb6462ce9a33b4214e46e896afcb737f /src | |
| parent | 4e334d6141d239f97347bd2a93e2499414ecbc47 (diff) | |
| download | rust-9a6e3b900f458fd82c25e7679be2c8860aba4f22.tar.gz rust-9a6e3b900f458fd82c25e7679be2c8860aba4f22.zip | |
Add doc to `core::intrinsics` pointing out conservativeness of `needs_drop`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/intrinsics.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index e7af0be88a0..1ca243134cc 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -241,7 +241,12 @@ extern "rust-intrinsic" { /// will trigger a compiler error. pub fn return_address() -> *const u8; - /// Returns `true` if a type requires drop glue. + /// Returns `true` if the actual type given as `T` requires drop + /// glue; returns `false` if the actual type provided for `T` + /// implements `Copy`. + /// + /// If the actual type neither requires drop glue nor implements + /// `Copy`, then may return `true` or `false`. pub fn needs_drop<T>() -> bool; /// Returns `true` if a type is managed (will be allocated on the local heap) |
