mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Remove useless 'static
bounds on Box
allocator
#79327 added `'static` bounds to the allocator parameter for various `Box` + `Pin` APIs to ensure soundness. But it was a bit overzealous, some of the bounds aren't actually needed.
This commit is contained in:
parent
317d14a56c
commit
1265af0396
@ -2104,13 +2104,10 @@ impl<T: ?Sized, A: Allocator> AsMut<T> for Box<T, A> {
|
||||
* could have a method to project a Pin<T> from it.
|
||||
*/
|
||||
#[stable(feature = "pin", since = "1.33.0")]
|
||||
impl<T: ?Sized, A: Allocator> Unpin for Box<T, A> where A: 'static {}
|
||||
impl<T: ?Sized, A: Allocator> Unpin for Box<T, A> {}
|
||||
|
||||
#[unstable(feature = "coroutine_trait", issue = "43122")]
|
||||
impl<G: ?Sized + Coroutine<R> + Unpin, R, A: Allocator> Coroutine<R> for Box<G, A>
|
||||
where
|
||||
A: 'static,
|
||||
{
|
||||
impl<G: ?Sized + Coroutine<R> + Unpin, R, A: Allocator> Coroutine<R> for Box<G, A> {
|
||||
type Yield = G::Yield;
|
||||
type Return = G::Return;
|
||||
|
||||
@ -2133,10 +2130,7 @@ where
|
||||
}
|
||||
|
||||
#[stable(feature = "futures_api", since = "1.36.0")]
|
||||
impl<F: ?Sized + Future + Unpin, A: Allocator> Future for Box<F, A>
|
||||
where
|
||||
A: 'static,
|
||||
{
|
||||
impl<F: ?Sized + Future + Unpin, A: Allocator> Future for Box<F, A> {
|
||||
type Output = F::Output;
|
||||
|
||||
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||
|
Loading…
Reference in New Issue
Block a user