#[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
#[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
/// assert_eq!(data.find::<Foo>(), None);
/// data.insert(Foo { str: "foo".to_string() });
/// assert_eq!(data.find(), Some(&Foo { str: "foo".to_string() }));
/// assert_eq!(data.find::<Foo>(), None);
/// data.insert(Foo { str: "foo".to_string() });
/// assert_eq!(data.find(), Some(&Foo { str: "foo".to_string() }));
/// assert_eq!(data.find::<Foo>().unwrap().str.as_slice(), "foot");
/// ```
///
/// Values containing non-static references are not permitted.
pub struct AnyMap {
/// assert_eq!(data.find::<Foo>().unwrap().str.as_slice(), "foot");
/// ```
///
/// Values containing non-static references are not permitted.
pub struct AnyMap {
- data: HashMap<TypeId, Box<Any>, TypeIdHasher>,
+ data: HashMap<TypeId, Box<Any + 'static>, TypeIdHasher>,