given Vec<foo:Bar> (with single ':') in a struct field, rustc provides an unintuitive affiliated types error #92685
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: (https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c485d59d73a93f4845ea71f4dd4a08b9
The current output is:
Ideally the output would point out the potential that the user had meant to type '::' instead of ':'.
Rationale: I hit this and I spent a few minutes trying to figure out what was going on before I realized that I had made a type and written ':' instead of '::' - it's the kind of small typo the eye easily glazes over
cc @estebank per https://twitter.com/ekuber/status/1479928446218293249, thanks so much for putting so much time into ergonomics <3
The text was updated successfully, but these errors were encountered: