diff options
| author | bors <bors@rust-lang.org> | 2014-04-15 19:21:57 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-04-15 19:21:57 -0700 |
| commit | b400a4d27256dba01089c56d856f6f0b84c63e2f (patch) | |
| tree | 78272c8eb3f5448e233ae81b6d66963039501e42 /src/libstd | |
| parent | 6fcf43e50e9dd8ad8dc83d550e25f738f821f1ce (diff) | |
| parent | 133834084e7fb8efba6e9c25816b6d4de03007ff (diff) | |
| download | rust-b400a4d27256dba01089c56d856f6f0b84c63e2f.tar.gz rust-b400a4d27256dba01089c56d856f6f0b84c63e2f.zip | |
auto merge of #13498 : johnsoft/rust/fix-transmute-fn-names, r=alexcrichton
Regions were renamed to lifetimes a while back, so these functions should probably be renamed as well.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/cast.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/cast.rs b/src/libstd/cast.rs index de9e916c746..f9f9e395f2e 100644 --- a/src/libstd/cast.rs +++ b/src/libstd/cast.rs @@ -63,9 +63,9 @@ pub unsafe fn transmute<L, G>(thing: L) -> G { #[inline] pub unsafe fn transmute_mut<'a,T>(ptr: &'a T) -> &'a mut T { transmute(ptr) } -/// Coerce a reference to have an arbitrary associated region. +/// Coerce a reference to have an arbitrary associated lifetime. #[inline] -pub unsafe fn transmute_region<'a,'b,T>(ptr: &'a T) -> &'b T { +pub unsafe fn transmute_lifetime<'a,'b,T>(ptr: &'a T) -> &'b T { transmute(ptr) } @@ -75,28 +75,28 @@ pub unsafe fn transmute_mut_unsafe<T>(ptr: *T) -> *mut T { transmute(ptr) } -/// Coerce a mutable reference to have an arbitrary associated region. +/// Coerce a mutable reference to have an arbitrary associated lifetime. #[inline] -pub unsafe fn transmute_mut_region<'a,'b,T>(ptr: &'a mut T) -> &'b mut T { +pub unsafe fn transmute_mut_lifetime<'a,'b,T>(ptr: &'a mut T) -> &'b mut T { transmute(ptr) } /// Transforms lifetime of the second pointer to match the first. #[inline] pub unsafe fn copy_lifetime<'a,S,T>(_ptr: &'a S, ptr: &T) -> &'a T { - transmute_region(ptr) + transmute_lifetime(ptr) } /// Transforms lifetime of the second pointer to match the first. #[inline] pub unsafe fn copy_mut_lifetime<'a,S,T>(_ptr: &'a mut S, ptr: &mut T) -> &'a mut T { - transmute_mut_region(ptr) + transmute_mut_lifetime(ptr) } /// Transforms lifetime of the second pointer to match the first. #[inline] pub unsafe fn copy_lifetime_vec<'a,S,T>(_ptr: &'a [S], ptr: &T) -> &'a T { - transmute_region(ptr) + transmute_lifetime(ptr) } |
