-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
https://internals.rust-lang.org/t/initialization-syntax-for-self-tuple-structs/5389/5 talks about this problem. But the solution (using the typename, rather than Self) isn't discussed anywhere (that I could find).
Could a helpful compiler message be added (until the problem is fixed)? Something to the effect of
"Use of Self
when initializing a tuple struct is not currently supported. Please try <typename>(...)
instead." (where code following 'Please try' is the user's code with Self
replaced with the struct's typename).
scottmcm
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.