Skip to content

Commit 932f239

Browse files
committed
respect distinct anonymous regions in unsafe::transmute_*
1 parent f533276 commit 932f239

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/unsafe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ unsafe fn transmute<L, G>(-thing: L) -> G {
5656
}
5757

5858
/// Coerce an immutable reference to be mutable.
59-
unsafe fn transmute_mut<T>(+ptr: &T) -> &mut T { transmute(ptr) }
59+
unsafe fn transmute_mut<T>(+ptr: &a/T) -> &a/mut T { transmute(ptr) }
6060
/// Coerce a mutable reference to be immutable.
61-
unsafe fn transmute_immut<T>(+ptr: &mut T) -> &T { transmute(ptr) }
61+
unsafe fn transmute_immut<T>(+ptr: &a/mut T) -> &a/T { transmute(ptr) }
6262
/// Coerce a borrowed pointer to have an arbitrary associated region.
6363
unsafe fn transmute_region<T>(+ptr: &a/T) -> &b/T { transmute(ptr) }
6464
/// Coerce a borrowed mutable pointer to have an arbitrary associated region.

0 commit comments

Comments
 (0)