about summary refs log tree commit diff
path: root/src/libcore/panic.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-11-25 12:16:08 +0100
committerRalf Jung <post@ralfj.de>2019-11-25 12:16:08 +0100
commit08f779cb4b481be58eeb5ecc421f69503780e8b1 (patch)
tree95896dbd33e56152d8f42a065317b70f7a3f5aff /src/libcore/panic.rs
parentcd5d0c7b102d2573165efdbd2ffc31c4a5be3bb5 (diff)
downloadrust-08f779cb4b481be58eeb5ecc421f69503780e8b1.tar.gz
rust-08f779cb4b481be58eeb5ecc421f69503780e8b1.zip
better comment and rename BoxMeUp::box_me_up to take_box
Diffstat (limited to 'src/libcore/panic.rs')
-rw-r--r--src/libcore/panic.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcore/panic.rs b/src/libcore/panic.rs
index cdd38449a1b..0abc481f6e5 100644
--- a/src/libcore/panic.rs
+++ b/src/libcore/panic.rs
@@ -266,6 +266,8 @@ impl fmt::Display for Location<'_> {
 #[unstable(feature = "std_internals", issue = "0")]
 #[doc(hidden)]
 pub unsafe trait BoxMeUp {
-    fn box_me_up(&mut self) -> *mut (dyn Any + Send);
+    /// The return type is actually `Box<dyn Any + Send>`, but we cannot use `Box` in libcore.
+    /// After this method got called, only some dummy default value is left in `self`.
+    fn take_box(&mut self) -> *mut (dyn Any + Send);
     fn get(&mut self) -> &(dyn Any + Send);
 }