Rust update.

This commit is contained in:
Chris Morgan 2014-11-28 16:51:35 +11:00
parent 901b94ef25
commit 77a6bf4569

View file

@ -56,7 +56,7 @@ trait UncheckedAnyRefExt<'a> {
unsafe fn downcast_ref_unchecked<T: 'static>(self) -> &'a T;
}
impl<'a> UncheckedAnyRefExt<'a> for &'a Any + 'a {
impl<'a> UncheckedAnyRefExt<'a> for &'a (Any + 'a) {
#[inline]
unsafe fn downcast_ref_unchecked<T: 'static>(self) -> &'a T {
// Get the raw representation of the trait object
@ -74,7 +74,7 @@ trait UncheckedAnyMutRefExt<'a> {
unsafe fn downcast_mut_unchecked<T: 'static>(self) -> &'a mut T;
}
impl<'a> UncheckedAnyMutRefExt<'a> for &'a mut Any + 'a {
impl<'a> UncheckedAnyMutRefExt<'a> for &'a mut (Any + 'a) {
#[inline]
unsafe fn downcast_mut_unchecked<T: 'static>(self) -> &'a mut T {
// Get the raw representation of the trait object