Better error for import of associated items #74030
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Hi. I was using a crate which had a struct with a number of associated items and I was trying to save typing in an error handling function. But:
I looked in the Reference and I wasn't able to find any discussion of this. In particular, I would expect it to be documented in the explanation of Use declarations under Items.
After considerably more digging, I found:
use
d #24915, a closed issue where the resolution was that this is not expected to workIt seems that this situation is likely to persist. Maybe the error message could be improved? Something like
could help the user by letting them know they can't avoid the extra typing.
I will also file an issue against the Reference. Thanks for your attention.
The text was updated successfully, but these errors were encountered: