diff options
| author | bors <bors@rust-lang.org> | 2014-04-05 12:11:32 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-04-05 12:11:32 -0700 |
| commit | 9539be6d746bec6b7b43e358999a91e4d1f9a759 (patch) | |
| tree | 90e347164d45438630cc9c824d8464f54875d664 | |
| parent | 5dacd1174d95732e2b2368896815781bbf891616 (diff) | |
| parent | dbeea147ad1ec73590fdeafada895d0de2ad4278 (diff) | |
| download | rust-9539be6d746bec6b7b43e358999a91e4d1f9a759.tar.gz rust-9539be6d746bec6b7b43e358999a91e4d1f9a759.zip | |
auto merge of #13343 : tbu-/rust/pr_smallfix, r=pcwalton
Fix an unnecessary use of `cast::transmute` Wherever possible, more specialized variants of said functions should be used, such as in this case `cast::transmute_mmut_unsafe`.
| -rw-r--r-- | src/libstd/ty.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/ty.rs b/src/libstd/ty.rs index dc4e55deb4b..0c9f0b02fdf 100644 --- a/src/libstd/ty.rs +++ b/src/libstd/ty.rs @@ -63,7 +63,7 @@ impl<T> Unsafe<T> { /// Gets a mutable pointer to the wrapped value #[inline] - pub unsafe fn get(&self) -> *mut T { cast::transmute(&self.value) } + pub unsafe fn get(&self) -> *mut T { cast::transmute_mut_unsafe(&self.value) } /// Unwraps the value #[inline] |
