Chris Morgan
›
Git
›
anymap
› commitdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7c9bd44
)
commit
grep
author
committer
pickaxe
?
search:
re
Rust update.
author
Chris Morgan
<me@chrismorgan.info>
Wed, 17 Dec 2014 02:29:49 +0000
committer
Chris Morgan
<me@chrismorgan.info>
Wed, 17 Dec 2014 02:29:49 +0000
src/lib.rs
patch
|
blob
|
history
diff --git
a/src/lib.rs
b/src/lib.rs
index 043578f158cde1cf059048033f7efcc737bdab72..5aea4bf93f2cd673f0a88c6a0a5876fb7811aa6a 100644
(file)
--- a/
src/lib.rs
+++ b/
src/lib.rs
@@
-13,7
+13,7
@@
use std::intrinsics::{forget, TypeId};
use std::collections::HashMap;
use std::collections::hash_map;
use std::hash::{Hash, Hasher, Writer};
use std::collections::HashMap;
use std::collections::hash_map;
use std::hash::{Hash, Hasher, Writer};
-use std::mem::
{transmute, transmute_copy}
;
+use std::mem::
transmute
;
use std::raw::TraitObject;
pub use Entry::{Vacant, Occupied};
use std::raw::TraitObject;
pub use Entry::{Vacant, Occupied};
@@
-54,11
+54,11
@@
trait UncheckedAnyRefExt<'a> {
unsafe fn downcast_ref_unchecked<T: 'static>(self) -> &'a T;
}
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
{
#[inline]
unsafe fn downcast_ref_unchecked<T: 'static>(self) -> &'a T {
// Get the raw representation of the trait object
#[inline]
unsafe fn downcast_ref_unchecked<T: 'static>(self) -> &'a T {
// Get the raw representation of the trait object
- let to: TraitObject = transmute
_copy(&
self);
+ let to: TraitObject = transmute
(
self);
// Extract the data pointer
transmute(to.data)
// Extract the data pointer
transmute(to.data)
@@
-72,11
+72,11
@@
trait UncheckedAnyMutRefExt<'a> {
unsafe fn downcast_mut_unchecked<T: 'static>(self) -> &'a mut T;
}
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
{
#[inline]
unsafe fn downcast_mut_unchecked<T: 'static>(self) -> &'a mut T {
// Get the raw representation of the trait object
#[inline]
unsafe fn downcast_mut_unchecked<T: 'static>(self) -> &'a mut T {
// Get the raw representation of the trait object
- let to: TraitObject = transmute
_copy(&
self);
+ let to: TraitObject = transmute
(
self);
// Extract the data pointer
transmute(to.data)
// Extract the data pointer
transmute(to.data)