about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorAndrew Paseltiner <apaseltiner@gmail.com>2014-12-05 13:53:38 -0500
committerAndrew Paseltiner <apaseltiner@gmail.com>2014-12-05 14:04:57 -0500
commit600faba5bc0b0b8bfef048ca9e8698e5f8c157f0 (patch)
tree3403e94541e4a46342744061416eae543f70b42d /src/libcore
parent4573da6f4ffb276c31773679fd19581fc15ded8f (diff)
downloadrust-600faba5bc0b0b8bfef048ca9e8698e5f8c157f0.tar.gz
rust-600faba5bc0b0b8bfef048ca9e8698e5f8c157f0.zip
libcore: Fix `Sized` bounds on overloaded function traits.
- Remove the `for Sized?` bound on `core::ops::FnOnce`, as it takes
  `self` by value and can never be implemented by an unsized type.
- Add a missing `Sized?` bound to the blanket `core::ops::FnMut` impl,
  as both `Fn` and `FnMut` are `for Sized?`.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/ops.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs
index 4f4ec486797..f24eb483fd7 100644
--- a/src/libcore/ops.rs
+++ b/src/libcore/ops.rs
@@ -812,12 +812,12 @@ pub trait FnMut<Args,Result> for Sized? {
 
 /// A version of the call operator that takes a by-value receiver.
 #[lang="fn_once"]
-pub trait FnOnce<Args,Result> for Sized? {
+pub trait FnOnce<Args,Result> {
     /// This is called when the call operator is used.
     extern "rust-call" fn call_once(self, args: Args) -> Result;
 }
 
-impl<F,A,R> FnMut<A,R> for F
+impl<Sized? F,A,R> FnMut<A,R> for F
     where F : Fn<A,R>
 {
     extern "rust-call" fn call_mut(&mut self, args: A) -> R {