You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<anon>:7:5: 7:28 error: failed to find an implementation of trait core::ops::FnMut<(int),int> for closure
<anon>:7 once_.call_once((0i, ));
^~~~~~~~~~~~~~~~~~~~~~~
<anon>:7:5: 7:28 error: failed to find an implementation of trait core::ops::FnMut<(int),int> for closure
<anon>:7 once_.call_once((0i, ));
^~~~~~~~~~~~~~~~~~~~~~~
It's particularly strange that the mut_.call_once form works (it's also a little strange that the error message is emitted twice.)
The text was updated successfully, but these errors were encountered:
#![feature(unboxed_closures, unboxed_closure_sugar)]fnmain(){let f = |&: x:int| x;
f.call((1i,));}
<anon>:5:5: 5:18 error: failed to find an implementation of trait core::ops::FnMut<(int),int> for closure
<anon>:5 f.call((1i,));
^~~~~~~~~~~~~
<anon>:5:5: 5:18 error: failed to find an implementation of trait core::ops::FnMut<(int),int> for closure
<anon>:5 f.call((1i,));
^~~~~~~~~~~~~
huonw
changed the title
|: ...| closure syntax looks for FnMut for call_once method call
non-&mut unboxed closures look for FnMut trait for direct call_once/call method call
Aug 19, 2014
It's particularly strange that the
mut_.call_once
form works (it's also a little strange that the error message is emitted twice.)The text was updated successfully, but these errors were encountered: