Implement working Clone and PartialEq on DataPayload and Yoke #753
Labels
C-data-infra
Component: provider, datagen, fallback, adapters
question
Unresolved questions; type unclear
T-core
Type: Required functionality
Milestone
Currently, the
Clone
impl is present forYoke
andDataPayload
, but it does not work when one tries to use it. The error looks like this:This seems to be caused by rust-lang/rust#85636. However, the workaround mentioned there does not work for
Clone
, since the Clone impl for a reference copies the reference instead of cloning the struct that the reference points to.PartialEq
is a related but separate issue. I have the following impl, but it doesn't compile:Error message:
I played around with different variations of
&
and*
on the arguments to get them to match up, to no success. My guess is that the compiler is just confused about the lifetimes, since the lifetime of.get()
is different than the lifetime ofother
.CC @Manishearth
The text was updated successfully, but these errors were encountered: