Unhelpful error message when trying to add elements to hash map #45491
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
The following code works fine in cpp:
In Rust however, you are getting an error:
The error doesn't really tell you what is indexed immutably. IMO it should explain that hashmaps have the insert function instead and maybe even should suggest it.
The text was updated successfully, but these errors were encountered: