diff options
| author | bors <bors@rust-lang.org> | 2014-05-18 19:51:26 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-18 19:51:26 -0700 |
| commit | 4b81b6d5f417fe486c13ef9d5c87f77874e54ded (patch) | |
| tree | b5109b72f2a445a7b125a98f78b86a17a6b17058 /src/libcore | |
| parent | 50b26df59ef848756645157cb6cf17f1e6cff1dc (diff) | |
| parent | 9a8ef9197bc5d44e783965052da33e36a88527bb (diff) | |
| download | rust-4b81b6d5f417fe486c13ef9d5c87f77874e54ded.tar.gz rust-4b81b6d5f417fe486c13ef9d5c87f77874e54ded.zip | |
auto merge of #14276 : aochagavia/rust/pr, r=alexcrichton
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/ptr.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index acdf0bf0658..870fa0ec53f 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -359,7 +359,7 @@ impl<T> RawPtr<T> for *T { if self.is_null() { None } else { - Some(mem::transmute(*self)) + Some(&**self) } } } @@ -384,7 +384,7 @@ impl<T> RawPtr<T> for *mut T { if self.is_null() { None } else { - Some(mem::transmute(*self)) + Some(&**self) } } } |
