-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
ToOwned not implemented for Cow as it ought to be #100347
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=442442eaa00a34e7c38f9d9db3654160
I expected to see this happen: it compiles successfully.
Instead, this happened: it fails to compile with the following error:
Meta
As of today's stable version 1.61.1, no versions have ever successfully accepted this code. However I believe there is nothing inherently wrong about it and I have faced this failure for such pattern multiple times already.
Workaround
You can workaround the issue by writing your
Cow-like type.