about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-05-08 15:03:39 -0400
committerDaniel Micay <danielmicay@gmail.com>2013-05-08 16:00:49 -0400
commit044abef0e56f02c36cf93fd9572813c2b27f98af (patch)
treeb804895f5d40c57f3ea707368773cbc0e230c5a6 /src/libcore
parentb21f37c81804293168424697518d306542cdd798 (diff)
downloadrust-044abef0e56f02c36cf93fd9572813c2b27f98af.tar.gz
rust-044abef0e56f02c36cf93fd9572813c2b27f98af.zip
fix incorrect region code based on the old 'self
also removes unnecessary casts from the RcMut implementation
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/cast.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcore/cast.rs b/src/libcore/cast.rs
index 96e1c3bd124..c648ec198e1 100644
--- a/src/libcore/cast.rs
+++ b/src/libcore/cast.rs
@@ -110,6 +110,12 @@ pub unsafe fn copy_lifetime<'a,S,T>(_ptr: &'a S, ptr: &T) -> &'a T {
 
 /// Transforms lifetime of the second pointer to match the first.
 #[inline(always)]
+pub unsafe fn copy_mut_lifetime<'a,S,T>(_ptr: &'a mut S, ptr: &mut T) -> &'a mut T {
+    transmute_mut_region(ptr)
+}
+
+/// Transforms lifetime of the second pointer to match the first.
+#[inline(always)]
 pub unsafe fn copy_lifetime_vec<'a,S,T>(_ptr: &'a [S], ptr: &T) -> &'a T {
     transmute_region(ptr)
 }