Chris Morgan
›
Git
›
anymap
› commitdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
patch
|
inline
| side by side (parent:
7dc36ad
)
commit
grep
author
committer
pickaxe
?
search:
re
Add now-necessary lifetime bounds.
author
Chris Morgan
<me@chrismorgan.info>
Mon, 15 Sep 2014 20:32:57 +0000
committer
Chris Morgan
<me@chrismorgan.info>
Mon, 15 Sep 2014 20:32:57 +0000
src/lib.rs
patch
|
blob
|
history
diff --git
a/src/lib.rs
b/src/lib.rs
index 0c71e367ab39814bb219a547cce50ef7bdc46a9e..296ec8cb739338f9960286ebbcd93aa9215f9d1e 100644
(file)
--- a/
src/lib.rs
+++ b/
src/lib.rs
@@
-53,7
+53,7
@@
trait UncheckedAnyRefExt<'a> {
unsafe fn as_ref_unchecked<T: 'static>(self) -> &'a T;
}
unsafe fn as_ref_unchecked<T: 'static>(self) -> &'a T;
}
-impl<'a> UncheckedAnyRefExt<'a> for &'a Any {
+impl<'a> UncheckedAnyRefExt<'a> for &'a Any
+ 'a
{
#[inline]
unsafe fn as_ref_unchecked<T: 'static>(self) -> &'a T {
// Get the raw representation of the trait object
#[inline]
unsafe fn as_ref_unchecked<T: 'static>(self) -> &'a T {
// Get the raw representation of the trait object
@@
-71,7
+71,7
@@
trait UncheckedAnyMutRefExt<'a> {
unsafe fn as_mut_unchecked<T: 'static>(self) -> &'a mut T;
}
unsafe fn as_mut_unchecked<T: 'static>(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<T: 'static>(self) -> &'a mut T {
// Get the raw representation of the trait object
#[inline]
unsafe fn as_mut_unchecked<T: 'static>(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 {
///
/// Values containing non-static references are not permitted.
pub struct AnyMap {
- data: HashMap<TypeId, Box<Any>, TypeIdHasher>,
+ data: HashMap<TypeId, Box<Any
+ 'static
>, TypeIdHasher>,
}
impl AnyMap {
}
impl AnyMap {