Account for typo in turbofish and suggest ::

This commit is contained in:
Esteban Küber 2019-11-05 10:29:54 -08:00
parent 3bbfc7320b
commit a8ccbf5f2f
2 changed files with 11 additions and 5 deletions

View file

@ -4,7 +4,7 @@ error: expected `::`, found `(`
LL | vec![Ok(2)].into_iter().collect:<Result<Vec<_>,_>>()?;
| - ^ expected `::`
| |
| tried to parse a type due to this type ascription
| help: maybe write a path separator here: `::`
|
= note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
= note: for more information, see https://github.com/rust-lang/rust/issues/23416