From ad7ea81ba60233358fe3a025f08ee05537c3eb4d Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Mon, 15 Sep 2014 13:32:57 -0700 Subject: [PATCH] Add now-necessary lifetime bounds. --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0c71e36..296ec8c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,7 +53,7 @@ trait UncheckedAnyRefExt<'a> { unsafe fn as_ref_unchecked(self) -> &'a T; } -impl<'a> UncheckedAnyRefExt<'a> for &'a Any { +impl<'a> UncheckedAnyRefExt<'a> for &'a Any + 'a { #[inline] unsafe fn as_ref_unchecked(self) -> &'a T { // Get the raw representation of the trait object @@ -71,7 +71,7 @@ trait UncheckedAnyMutRefExt<'a> { unsafe fn as_mut_unchecked(self) -> &'a mut T; } -impl<'a> UncheckedAnyMutRefExt<'a> for &'a mut Any { +impl<'a> UncheckedAnyMutRefExt<'a> for &'a mut Any + 'a { #[inline] unsafe fn as_mut_unchecked(self) -> &'a mut T { // Get the raw representation of the trait object @@ -108,7 +108,7 @@ impl<'a> UncheckedAnyMutRefExt<'a> for &'a mut Any { /// /// Values containing non-static references are not permitted. pub struct AnyMap { - data: HashMap, TypeIdHasher>, + data: HashMap, TypeIdHasher>, } impl AnyMap {