Closed
Description
The following code is using a single :
instead of a mod-sep ::
:
fn main() -> Result<(), ()> {
vec![Ok(2)].into_iter().collect:<Result<Vec<_>,_>>()?;
Ok(())
}
The compiler doesn't point at the problem:
error: expected `::`, found `(`
--> src/main.rs:2:55
|
2 | vec![Ok(2)].into_iter().collect:<Result<Vec<_>,_>>()?;
| ^ expected `::`
It should point at the :
after collect
.