Skip to content

Commit b84baf2

Browse files
committed
stabilize nonnull_cast feature
1 parent 4a8f4b7 commit b84baf2

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

src/liballoc/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
#![feature(lang_items)]
100100
#![feature(libc)]
101101
#![feature(needs_allocator)]
102-
#![feature(nonnull_cast)]
103102
#![feature(nonzero)]
104103
#![feature(optin_builtin_traits)]
105104
#![feature(pattern)]

src/libcore/ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2742,7 +2742,7 @@ impl<T: ?Sized> NonNull<T> {
27422742
}
27432743

27442744
/// Cast to a pointer of another type
2745-
#[unstable(feature = "nonnull_cast", issue = "47653")]
2745+
#[stable(feature = "nonnull_cast", since = "1.27.0")]
27462746
pub fn cast<U>(self) -> NonNull<U> {
27472747
unsafe {
27482748
NonNull::new_unchecked(self.as_ptr() as *mut U)

src/libstd/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@
275275
#![feature(macro_reexport)]
276276
#![feature(macro_vis_matcher)]
277277
#![feature(needs_panic_runtime)]
278-
#![feature(nonnull_cast)]
279278
#![feature(exhaustive_patterns)]
280279
#![feature(nonzero)]
281280
#![feature(num_bits_bytes)]

src/test/run-pass/realloc-16687.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// Ideally this would be revised to use no_std, but for now it serves
1414
// well enough to reproduce (and illustrate) the bug from #16687.
1515

16-
#![feature(heap_api, allocator_api, nonnull_cast)]
16+
#![feature(heap_api, allocator_api)]
1717

1818
use std::alloc::{Global, Alloc, Layout};
1919
use std::ptr::{self, NonNull};

0 commit comments

Comments
 (0)