-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Associated Type Bounds on Trait Bounds on GAT produce error #136144
Copy link
Copy link
Open
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.F-associated_type_bounds`#![feature(associated_type_bounds)]``#![feature(associated_type_bounds)]`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.
Metadata
Metadata
Assignees
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.F-associated_type_bounds`#![feature(associated_type_bounds)]``#![feature(associated_type_bounds)]`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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I hope this is a genuine bug and not just working as intended🙈
I tried this code:
I expected to see this happen: The code compiles.
Instead, this happened: The code produces the following compile error:
Note that either removing
<T>or replacing it with<T: 'static>makes the error go away.Meta
rustc --version --verbose:Also persists on latest nightly: