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>:51:16: 51:83 error: cannot determine a type for this bounded type parameter: unconstrained type
<anon>:51 assert_eq!(match_indices(s, |c: char| c == 'b').collect::<Vec<(uint, uint)>>(),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 14:2 note: in expansion of assert_eq!
<anon>:51:5: 52:40 note: expansion site
playpen: application terminated with error code 101
I don't know precisely what's going on but I do know that we do some funky things with closure types. Probably this is an interaction with our over-reliance on expected types somehow, though it's not yet quite obvious to me.
alexcrichton
added
the
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
label
Oct 1, 2014
Error:
Code:
It works if the closure gets rooted in its own variable like this:
cc @nikomatsakis
The text was updated successfully, but these errors were encountered: