stabilize `nonnull_cast` feature

This commit is contained in:
tinaun 2018-04-17 00:59:16 -04:00
parent 4a8f4b7e49
commit b84baf2378
4 changed files with 2 additions and 4 deletions

View File

@ -99,7 +99,6 @@
#![feature(lang_items)]
#![feature(libc)]
#![feature(needs_allocator)]
#![feature(nonnull_cast)]
#![feature(nonzero)]
#![feature(optin_builtin_traits)]
#![feature(pattern)]

View File

@ -2742,7 +2742,7 @@ impl<T: ?Sized> NonNull<T> {
}
/// Cast to a pointer of another type
#[unstable(feature = "nonnull_cast", issue = "47653")]
#[stable(feature = "nonnull_cast", since = "1.27.0")]
pub fn cast<U>(self) -> NonNull<U> {
unsafe {
NonNull::new_unchecked(self.as_ptr() as *mut U)

View File

@ -275,7 +275,6 @@
#![feature(macro_reexport)]
#![feature(macro_vis_matcher)]
#![feature(needs_panic_runtime)]
#![feature(nonnull_cast)]
#![feature(exhaustive_patterns)]
#![feature(nonzero)]
#![feature(num_bits_bytes)]

View File

@ -13,7 +13,7 @@
// Ideally this would be revised to use no_std, but for now it serves
// well enough to reproduce (and illustrate) the bug from #16687.
#![feature(heap_api, allocator_api, nonnull_cast)]
#![feature(heap_api, allocator_api)]
use std::alloc::{Global, Alloc, Layout};
use std::ptr::{self, NonNull};