Skip to content

Replace 'region' with 'lifetime' in a few transmute function names #13498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2014

Conversation

whatisaphone
Copy link
Contributor

Regions were renamed to lifetimes a while back, so these functions should probably be renamed as well.

#[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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these copy_* methods useful at all? It looks like they aren't used anywhere in this repo. Maybe we should just axe them.

bors added a commit that referenced this pull request Apr 16, 2014
…ichton

Regions were renamed to lifetimes a while back, so these functions should probably be renamed as well.
@bors bors closed this Apr 16, 2014
@bors bors merged commit 1338340 into rust-lang:master Apr 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants