diff options
| author | Masaki Hara <ackie.h.gmai@gmail.com> | 2018-10-28 15:27:29 +0900 |
|---|---|---|
| committer | CrLF0710 <crlf0710@gmail.com> | 2019-04-05 02:26:49 +0800 |
| commit | 79941973af54db7f7b941582fdc9537b2ee95a00 (patch) | |
| tree | 0c81942ca9adb94da6b7dd902095c6c5abf8f08b /src/liballoc | |
| parent | 52980d0fb39134a26f73b39b384407e010fc3af5 (diff) | |
| download | rust-79941973af54db7f7b941582fdc9537b2ee95a00.tar.gz rust-79941973af54db7f7b941582fdc9537b2ee95a00.zip | |
Make FnBox a subtrait of FnOnce.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/boxed.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index b2315c6a739..9166f917293 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -735,9 +735,7 @@ impl<I: FusedIterator + ?Sized> FusedIterator for Box<I> {} #[rustc_paren_sugar] #[unstable(feature = "fnbox", reason = "will be deprecated if and when `Box<FnOnce>` becomes usable", issue = "28796")] -pub trait FnBox<A> { - type Output; - +pub trait FnBox<A>: FnOnce<A> { fn call_box(self: Box<Self>, args: A) -> Self::Output; } @@ -746,8 +744,6 @@ pub trait FnBox<A> { impl<A, F> FnBox<A> for F where F: FnOnce<A> { - type Output = F::Output; - fn call_box(self: Box<F>, args: A) -> F::Output { self.call_once(args) } |
