diff options
| author | Ralf Jung <post@ralfj.de> | 2019-11-25 12:16:08 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-11-25 12:16:08 +0100 |
| commit | 08f779cb4b481be58eeb5ecc421f69503780e8b1 (patch) | |
| tree | 95896dbd33e56152d8f42a065317b70f7a3f5aff /src/libcore/panic.rs | |
| parent | cd5d0c7b102d2573165efdbd2ffc31c4a5be3bb5 (diff) | |
| download | rust-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.rs | 4 |
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); } |
