Skip to content

Commit 45c0b28

Browse files
qnighycrlf0710
authored andcommitted
Remove FnBox specialization of impl FnOnce for Box<impl FnOnce>.
1 parent a38f292 commit 45c0b28

File tree

3 files changed

+1
-41
lines changed

3 files changed

+1
-41
lines changed

src/liballoc/boxed.rs

+1-17
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ impl<I: FusedIterator + ?Sized> FusedIterator for Box<I> {}
700700
impl<A, F: FnOnce<A> + ?Sized> FnOnce<A> for Box<F> {
701701
type Output = <F as FnOnce<A>>::Output;
702702

703-
default extern "rust-call" fn call_once(self, args: A) -> Self::Output {
703+
extern "rust-call" fn call_once(self, args: A) -> Self::Output {
704704
<F as FnOnce<A>>::call_once(*self, args)
705705
}
706706
}
@@ -777,22 +777,6 @@ impl<A, F> FnBox<A> for F
777777
}
778778
}
779779

780-
#[unstable(feature = "fnbox",
781-
reason = "will be deprecated if and when `Box<FnOnce>` becomes usable", issue = "28796")]
782-
impl<A, R> FnOnce<A> for Box<dyn FnBox<A, Output = R> + '_> {
783-
extern "rust-call" fn call_once(self, args: A) -> R {
784-
self.call_box(args)
785-
}
786-
}
787-
788-
#[unstable(feature = "fnbox",
789-
reason = "will be deprecated if and when `Box<FnOnce>` becomes usable", issue = "28796")]
790-
impl<A, R> FnOnce<A> for Box<dyn FnBox<A, Output = R> + Send + '_> {
791-
extern "rust-call" fn call_once(self, args: A) -> R {
792-
self.call_box(args)
793-
}
794-
}
795-
796780
#[unstable(feature = "coerce_unsized", issue = "27732")]
797781
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {}
798782

src/test/ui/unsized-locals/fnbox-compat.rs

-13
This file was deleted.

src/test/ui/unsized-locals/fnbox-compat.stderr

-11
This file was deleted.

0 commit comments

Comments
 (0)