Rollup merge of #138800 - RalfJung:const_box, r=oli-obk
remove remnants of const_box feature This feature requires major design work, and the few methods it gates currently aren't actually useful. Let's reset to a clean slate so when a design materializes, we can start from scratch. Closes https://github.com/rust-lang/rust/issues/92521 by removing the feature it tracks. r? ````@oli-obk````
This commit is contained in:
commit
0c25157784
1 changed files with 4 additions and 8 deletions
|
@ -1149,9 +1149,8 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
|
||||||
///
|
///
|
||||||
/// [memory layout]: self#memory-layout
|
/// [memory layout]: self#memory-layout
|
||||||
#[unstable(feature = "allocator_api", issue = "32838")]
|
#[unstable(feature = "allocator_api", issue = "32838")]
|
||||||
#[rustc_const_unstable(feature = "const_box", issue = "92521")]
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self {
|
pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self {
|
||||||
Box(unsafe { Unique::new_unchecked(raw) }, alloc)
|
Box(unsafe { Unique::new_unchecked(raw) }, alloc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1203,9 +1202,8 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
|
||||||
/// [memory layout]: self#memory-layout
|
/// [memory layout]: self#memory-layout
|
||||||
#[unstable(feature = "allocator_api", issue = "32838")]
|
#[unstable(feature = "allocator_api", issue = "32838")]
|
||||||
// #[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
|
// #[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
|
||||||
#[rustc_const_unstable(feature = "const_box", issue = "92521")]
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const unsafe fn from_non_null_in(raw: NonNull<T>, alloc: A) -> Self {
|
pub unsafe fn from_non_null_in(raw: NonNull<T>, alloc: A) -> Self {
|
||||||
// SAFETY: guaranteed by the caller.
|
// SAFETY: guaranteed by the caller.
|
||||||
unsafe { Box::from_raw_in(raw.as_ptr(), alloc) }
|
unsafe { Box::from_raw_in(raw.as_ptr(), alloc) }
|
||||||
}
|
}
|
||||||
|
@ -1550,9 +1548,8 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
|
||||||
/// to call it as `Box::allocator(&b)` instead of `b.allocator()`. This
|
/// to call it as `Box::allocator(&b)` instead of `b.allocator()`. This
|
||||||
/// is so that there is no conflict with a method on the inner type.
|
/// is so that there is no conflict with a method on the inner type.
|
||||||
#[unstable(feature = "allocator_api", issue = "32838")]
|
#[unstable(feature = "allocator_api", issue = "32838")]
|
||||||
#[rustc_const_unstable(feature = "const_box", issue = "92521")]
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub const fn allocator(b: &Self) -> &A {
|
pub fn allocator(b: &Self) -> &A {
|
||||||
&b.1
|
&b.1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1639,8 +1636,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
|
||||||
/// let bar = Pin::from(foo);
|
/// let bar = Pin::from(foo);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "box_into_pin", since = "1.63.0")]
|
#[stable(feature = "box_into_pin", since = "1.63.0")]
|
||||||
#[rustc_const_unstable(feature = "const_box", issue = "92521")]
|
pub fn into_pin(boxed: Self) -> Pin<Self>
|
||||||
pub const fn into_pin(boxed: Self) -> Pin<Self>
|
|
||||||
where
|
where
|
||||||
A: 'static,
|
A: 'static,
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue