]> git.lizzy.rs Git - rust.git/commitdiff
stabilize `nonnull_cast` feature
authortinaun <tinagma@gmail.com>
Tue, 17 Apr 2018 04:59:16 +0000 (00:59 -0400)
committertinaun <tinagma@gmail.com>
Tue, 17 Apr 2018 05:22:28 +0000 (01:22 -0400)
src/liballoc/lib.rs
src/libcore/ptr.rs
src/libstd/lib.rs
src/test/run-pass/realloc-16687.rs

index f2a61bda4aa84b0054694165cb6b70040edfa08f..163aef61b43628746a9e2f6f2dabf9f1062e3e44 100644 (file)
@@ -99,7 +99,6 @@
 #![feature(lang_items)]
 #![feature(libc)]
 #![feature(needs_allocator)]
-#![feature(nonnull_cast)]
 #![feature(nonzero)]
 #![feature(optin_builtin_traits)]
 #![feature(pattern)]
index f953b29fdc817e1fa205d7b6d9e08b4fe1aa87b4..74bb264cc679cc31c310cefade5b196cbd6881b8 100644 (file)
@@ -2742,7 +2742,7 @@ pub unsafe fn as_mut(&mut self) -> &mut 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)
index dd96c57538c7943f3fe807d125ea777c53909810..63e4a17d32e75c06a9ce3cbd1d586161439c46a9 100644 (file)
 #![feature(macro_reexport)]
 #![feature(macro_vis_matcher)]
 #![feature(needs_panic_runtime)]
-#![feature(nonnull_cast)]
 #![feature(exhaustive_patterns)]
 #![feature(nonzero)]
 #![feature(num_bits_bytes)]
index 38cc23c16a9766a39ba4e979c14c55531ce30771..afa3494c3891941dfdb8ecde5b44b80fe9e53ae0 100644 (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};