diff options
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/boxed.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 6a3e1fa2862..13d4a0a1f0a 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -105,9 +105,9 @@ pub trait BoxAny { } #[stable] -impl BoxAny for Box<Any> { +impl BoxAny for Box<Any+'static> { #[inline] - fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any>> { + fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any+'static>> { if self.is::<T>() { unsafe { // Get the raw representation of the trait object @@ -132,7 +132,7 @@ impl<T: fmt::Show> fmt::Show for Box<T> { } } -impl fmt::Show for Box<Any> { +impl fmt::Show for Box<Any+'static> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.pad("Box<Any>") } |
