Skip to content

Commit 4c692d3

Browse files
committed
auto merge of #19573 : apasel422/rust/sized_fn_once, r=alexcrichton
- 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?`.
2 parents 8fbfa66 + 600faba commit 4c692d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/libcore/ops.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -844,12 +844,12 @@ pub trait FnMut<Args,Result> for Sized? {
844844

845845
/// A version of the call operator that takes a by-value receiver.
846846
#[lang="fn_once"]
847-
pub trait FnOnce<Args,Result> for Sized? {
847+
pub trait FnOnce<Args,Result> {
848848
/// This is called when the call operator is used.
849849
extern "rust-call" fn call_once(self, args: Args) -> Result;
850850
}
851851

852-
impl<F,A,R> FnMut<A,R> for F
852+
impl<Sized? F,A,R> FnMut<A,R> for F
853853
where F : Fn<A,R>
854854
{
855855
extern "rust-call" fn call_mut(&mut self, args: A) -> R {

0 commit comments

Comments
 (0)