Skip to content

Commit

Permalink
Rollup merge of rust-lang#62713 - SimonSapin:cast, r=Centril
Browse files Browse the repository at this point in the history
Stabilize <*mut _>::cast and <*const _>::cast

Fixes rust-lang#60602.

FCP: rust-lang#60602 (comment)
  • Loading branch information
Centril committed Jul 22, 2019
2 parents 0de90c6 + 8040c54 commit 2567af6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ impl<T: ?Sized> *const T {
}

/// Cast to a pointer to a different type
#[unstable(feature = "ptr_cast", issue = "60602")]
#[stable(feature = "ptr_cast", since = "1.38.0")]
#[inline]
pub const fn cast<U>(self) -> *const U {
self as _
Expand Down Expand Up @@ -1678,7 +1678,7 @@ impl<T: ?Sized> *mut T {
}

/// Cast to a pointer to a different type
#[unstable(feature = "ptr_cast", issue = "60602")]
#[stable(feature = "ptr_cast", since = "1.38.0")]
#[inline]
pub const fn cast<U>(self) -> *mut U {
self as _
Expand Down

0 comments on commit 2567af6

Please sign in to comment.