Skip to content

Commit

Permalink
Remove std::cast::transmute_immut_unsafe
Browse files Browse the repository at this point in the history
It can be done in safe code using `as *T`.
  • Loading branch information
tbu- committed Mar 19, 2014
1 parent ff03335 commit 9b588a9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/libstd/cast.rs
Expand Up @@ -75,12 +75,6 @@ pub unsafe fn transmute_mut_unsafe<T>(ptr: *T) -> *mut T {
transmute(ptr)
}

/// Coerce an immutable reference to be mutable.
#[inline]
pub unsafe fn transmute_immut_unsafe<T>(ptr: *mut T) -> *T {
transmute(ptr)
}

/// Coerce a mutable reference to have an arbitrary associated region.
#[inline]
pub unsafe fn transmute_mut_region<'a,'b,T>(ptr: &'a mut T) -> &'b mut T {
Expand Down

17 comments on commit 9b588a9

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 19, 2014

Choose a reason for hiding this comment

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

saw approval from alexcrichton
at tbu-@9b588a9

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 19, 2014

Choose a reason for hiding this comment

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

merging tbu-/rust/pr_remove_immut = 9b588a9 into auto

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 19, 2014

Choose a reason for hiding this comment

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

tbu-/rust/pr_remove_immut = 9b588a9 merged ok, testing candidate = 4dbc1f10

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 19, 2014

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 19, 2014

Choose a reason for hiding this comment

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

saw approval from alexcrichton
at tbu-@9b588a9

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 19, 2014

Choose a reason for hiding this comment

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

merging tbu-/rust/pr_remove_immut = 9b588a9 into auto

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 19, 2014

Choose a reason for hiding this comment

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

tbu-/rust/pr_remove_immut = 9b588a9 merged ok, testing candidate = 1a51ea74

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 19, 2014

Choose a reason for hiding this comment

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

saw approval from alexcrichton
at tbu-@9b588a9

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 19, 2014

Choose a reason for hiding this comment

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

merging tbu-/rust/pr_remove_immut = 9b588a9 into auto

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 19, 2014

Choose a reason for hiding this comment

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

tbu-/rust/pr_remove_immut = 9b588a9 merged ok, testing candidate = 13d35719

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 20, 2014

Choose a reason for hiding this comment

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

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 20, 2014

Choose a reason for hiding this comment

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

saw approval from alexcrichton
at tbu-@9b588a9

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 20, 2014

Choose a reason for hiding this comment

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

merging tbu-/rust/pr_remove_immut = 9b588a9 into auto

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 20, 2014

Choose a reason for hiding this comment

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

tbu-/rust/pr_remove_immut = 9b588a9 merged ok, testing candidate = 8cfef59

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 20, 2014

Choose a reason for hiding this comment

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

@bors
Copy link
Contributor

@bors bors commented on 9b588a9 Mar 20, 2014

Choose a reason for hiding this comment

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

fast-forwarding master to auto = 8cfef59

Please sign in to comment.