Yes, sure. The best thing in these cases is break up the expression into several, no matter what exactly the compiler says. It's just quite an unusual way of reporting errors. Usually I'd expect a reference to something I can see in the code. Like here:
17 | let r = r.iter().map(|&i| &alpha[i..i+1]).collect();
| - consider giving `r` a type
18 | r.join("")
| ^ cannot infer type
Or maybe in some languages they do refer to things declared elsewhere, and I am just not used to it.
no subject
Date: 2020-01-26 02:29 am (UTC)no subject
Date: 2020-01-26 08:33 am (UTC)17 | let r = r.iter().map(|&i| &alpha[i..i+1]).collect(); | - consider giving `r` a type 18 | r.join("") | ^ cannot infer typeOr maybe in some languages they do refer to things declared elsewhere, and I am just not used to it.