diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index aa7344ba405a9..b70ba6fa6c8ed 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -543,7 +543,7 @@ impl Box { #[inline(always)] pub const fn pin_in(x: T, alloc: A) -> Pin where - A: 'static + ~const Allocator + ~const Drop, + A: ~const Allocator + ~const Drop, { Self::into_pin(Self::new_in(x, alloc)) } @@ -1158,10 +1158,7 @@ impl Box { /// This is also available via [`From`]. #[unstable(feature = "box_into_pin", issue = "62370")] #[rustc_const_unstable(feature = "const_box", issue = "92521")] - pub const fn into_pin(boxed: Self) -> Pin - where - A: 'static, - { + pub const fn into_pin(boxed: Self) -> Pin { // It's not possible to move or replace the insides of a `Pin>` // when `T: !Unpin`, so it's safe to pin it directly without any // additional requirements. @@ -1382,10 +1379,7 @@ impl From for Box { #[stable(feature = "pin", since = "1.33.0")] #[rustc_const_unstable(feature = "const_box", issue = "92521")] -impl const From> for Pin> -where - A: 'static, -{ +impl const From> for Pin> { /// Converts a `Box` into a `Pin>` /// /// This conversion does not allocate on the heap and happens in place. @@ -1951,14 +1945,10 @@ impl AsMut for Box { * could have a method to project a Pin from it. */ #[stable(feature = "pin", since = "1.33.0")] -#[rustc_const_unstable(feature = "const_box", issue = "92521")] -impl const Unpin for Box where A: 'static {} +impl const Unpin for Box {} #[unstable(feature = "generator_trait", issue = "43122")] -impl + Unpin, R, A: Allocator> Generator for Box -where - A: 'static, -{ +impl + Unpin, R, A: Allocator> Generator for Box { type Yield = G::Yield; type Return = G::Return; @@ -1968,10 +1958,7 @@ where } #[unstable(feature = "generator_trait", issue = "43122")] -impl, R, A: Allocator> Generator for Pin> -where - A: 'static, -{ +impl, R, A: Allocator> Generator for Pin> { type Yield = G::Yield; type Return = G::Return; @@ -1981,10 +1968,7 @@ where } #[stable(feature = "futures_api", since = "1.36.0")] -impl Future for Box -where - A: 'static, -{ +impl Future for Box { type Output = F::Output; fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll {