Skip to content

Commit ecc3e89

Browse files
committed
Stabilize boxed_closure_impls in 1.35.0.
1 parent 45c0b28 commit ecc3e89

File tree

3 files changed

+3
-109
lines changed

3 files changed

+3
-109
lines changed

src/doc/unstable-book/src/library-features/boxed-closure-impls.md

-98
This file was deleted.

src/liballoc/boxed.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,7 @@ impl<I: ExactSizeIterator + ?Sized> ExactSizeIterator for Box<I> {
694694
#[stable(feature = "fused", since = "1.26.0")]
695695
impl<I: FusedIterator + ?Sized> FusedIterator for Box<I> {}
696696

697-
#[unstable(feature = "boxed_closure_impls",
698-
reason = "Box<FnOnce> relies on unsized rvalues and needs to be tested more",
699-
issue = "48055")]
697+
#[stable(feature = "boxed_closure_impls", since = "1.35.0")]
700698
impl<A, F: FnOnce<A> + ?Sized> FnOnce<A> for Box<F> {
701699
type Output = <F as FnOnce<A>>::Output;
702700

@@ -705,18 +703,14 @@ impl<A, F: FnOnce<A> + ?Sized> FnOnce<A> for Box<F> {
705703
}
706704
}
707705

708-
#[unstable(feature = "boxed_closure_impls",
709-
reason = "Box<FnOnce> relies on unsized rvalues and needs to be tested more",
710-
issue = "48055")]
706+
#[stable(feature = "boxed_closure_impls", since = "1.35.0")]
711707
impl<A, F: FnMut<A> + ?Sized> FnMut<A> for Box<F> {
712708
extern "rust-call" fn call_mut(&mut self, args: A) -> Self::Output {
713709
<F as FnMut<A>>::call_mut(self, args)
714710
}
715711
}
716712

717-
#[unstable(feature = "boxed_closure_impls",
718-
reason = "Box<FnOnce> relies on unsized rvalues and needs to be tested more",
719-
issue = "48055")]
713+
#[stable(feature = "boxed_closure_impls", since = "1.35.0")]
720714
impl<A, F: Fn<A> + ?Sized> Fn<A> for Box<F> {
721715
extern "rust-call" fn call(&self, args: A) -> Self::Output {
722716
<F as Fn<A>>::call(self, args)

src/test/run-pass/unsized-locals/box-fnonce.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(boxed_closure_impls)]
2-
31
fn call_it<T>(f: Box<dyn FnOnce() -> T>) -> T {
42
f()
53
}

0 commit comments

Comments
 (0)