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
#![feature(unboxed_closures)]use std::ops::FnMut;fnmain(){letmut zero = |&mut:| {}; zero.call_mut(());// let mut one = |&mut: _: int| {}; one.call_mut((1,));}
<anon>:6:46: 6:48 error: mismatched types: expected `()` but found `()` (expected tuple but found ())
<anon>:6 let mut zero = |&mut:| {}; zero.call_mut(());
^~
Swapping the comments compiles fine.
(At a guess the compiler is looking for a tuple with no fields, which is not the same as unit ().)
The text was updated successfully, but these errors were encountered:
Swapping the comments compiles fine.
(At a guess the compiler is looking for a tuple with no fields, which is not the same as unit
()
.)The text was updated successfully, but these errors were encountered: