Skip to content

Commit 7994197

Browse files
qnighycrlf0710
authored andcommitted
Make FnBox a subtrait of FnOnce.
1 parent 52980d0 commit 7994197

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/liballoc/boxed.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,7 @@ impl<I: FusedIterator + ?Sized> FusedIterator for Box<I> {}
735735
#[rustc_paren_sugar]
736736
#[unstable(feature = "fnbox",
737737
reason = "will be deprecated if and when `Box<FnOnce>` becomes usable", issue = "28796")]
738-
pub trait FnBox<A> {
739-
type Output;
740-
738+
pub trait FnBox<A>: FnOnce<A> {
741739
fn call_box(self: Box<Self>, args: A) -> Self::Output;
742740
}
743741

@@ -746,8 +744,6 @@ pub trait FnBox<A> {
746744
impl<A, F> FnBox<A> for F
747745
where F: FnOnce<A>
748746
{
749-
type Output = F::Output;
750-
751747
fn call_box(self: Box<F>, args: A) -> F::Output {
752748
self.call_once(args)
753749
}

0 commit comments

Comments
 (0)