-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Trait bounds are not yet enforced in type definitions #21903
Copy link
Copy link
Open
Labels
A-trait-systemArea: Trait systemArea: Trait systemA-type-systemArea: Type systemArea: Type systemC-future-incompatibilityCategory: Future-incompatibility lintsCategory: Future-incompatibility lintsE-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.fixed-by-lazy-type-aliasesEnabling the feature `lazy_type_alias` fixes this issue.Enabling the feature `lazy_type_alias` fixes this issue.
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait systemA-type-systemArea: Type systemArea: Type systemC-future-incompatibilityCategory: Future-incompatibility lintsCategory: Future-incompatibility lintsE-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.fixed-by-lazy-type-aliasesEnabling the feature `lazy_type_alias` fixes this issue.Enabling the feature `lazy_type_alias` fixes this issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Idea
Status
Fixed By
View all comments
Opening an issue since I could not find any information on when/if this will be enforced. Would be really useful for some generalizing I am trying for parser-combinators which I can't do currently without complicating the API.
Specifically I'd like to use a trait bound in a type definition to access an associated type to avoid passing it seperately but due to this issue I simply get a compiler error.
Simplified code which exhibits the error: