generated from Tamschi/rust-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
HacktoberfestA good-for-Hacktoberfest issue. This label is only maintained in October.A good-for-Hacktoberfest issue. This label is only maintained in October.priority: somedayIf you need this, please let me know!If you need this, please let me know!state: approvedApproved to proceed.Approved to proceed.type: documentationRelated to documentation and information.Related to documentation and information.type: featureBrand new functionality, features, pages, workflows, endpoints, etc.Brand new functionality, features, pages, workflows, endpoints, etc.work: clearA known solution is (to be) implemented.A known solution is (to be) implemented.
Description
Is your feature request related to a problem? Please describe.
Currently, it's easy to forget to expose a dyncast target for existing functionality, and this can be a bit tricky to debug.
Describe the solution you'd like
The most clear solution would be an additional attribute #[not_dyncast(…)] that accepts (token literal) types for which there'd otherwise be a warning.
Describe alternatives you've considered
An alternative would be to allow negative targets (i.e. dyn !Trait), but that's less obvious and potentially leads to parsing difficulties once the never-type is available.
Additional context
Specifying a literal type with not_dyncast but also exposing it should be statically checked and turned into a compile-time error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
HacktoberfestA good-for-Hacktoberfest issue. This label is only maintained in October.A good-for-Hacktoberfest issue. This label is only maintained in October.priority: somedayIf you need this, please let me know!If you need this, please let me know!state: approvedApproved to proceed.Approved to proceed.type: documentationRelated to documentation and information.Related to documentation and information.type: featureBrand new functionality, features, pages, workflows, endpoints, etc.Brand new functionality, features, pages, workflows, endpoints, etc.work: clearA known solution is (to be) implemented.A known solution is (to be) implemented.