-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
where T::Ty<'_>: Trait bounds #155446
Copy link
Copy link
Open
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language teamT-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-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language teamT-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.
Currently for
the derive produces
The bounds aren't "perfect" (#26925), but one of them (
T::SomeType<'_>: Clone) gets rejected by the compiler. This showed up in #143131, where it was attributed tosingle_use_lifetimegiving an invalid suggestion. I, personally, considered it to be more of aderive(Clone)flaw, but now that I think about it, I can't understand whyT::SomeType<'_>: Cloneis being rejected by the compiler in the first place and isn't expanded intofor<'a> T::SomeType<'a>: Cloneinstead. Is this intentional? Is this just something that needs implementation? And if so, is it planned and tracked somewhere?I asked on Zulip, but no definitive answer was reached.