error[E0277]: the trait bound `Cell<()>: ShallowCopy` is not satisfied --> $DIR/lib.rs:7:2 | 7 | f2: std::cell::Cell<()>, | ^^ the trait `ShallowCopy` is not implemented for `Cell<()>` | = note: required by `shallow_copy` error[E0277]: the trait bound `Cell<()>: ShallowCopy` is not satisfied --> $DIR/lib.rs:10:10 | 10 | #[derive(ShallowCopy)] | ^^^^^^^^^^^ the trait `ShallowCopy` is not implemented for `Cell<()>` | = note: required by `shallow_copy` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: no method named `shallow_copy` found for struct `Generic>` in the current scope --> $DIR/lib.rs:24:10 | 14 | struct Generic { | ----------------- | | | method `shallow_copy` not found for this | doesn't satisfy `Generic>: ShallowCopy` ... 24 | generic.shallow_copy(); | ^^^^^^^^^^^^ method not found in `Generic>` | ::: $RUST/core/src/cell.rs | | pub struct Cell { | -------------------------- doesn't satisfy `Cell<()>: ShallowCopy` | ::: $WORKSPACE/evmap/src/shallow_copy.rs | | unsafe fn shallow_copy(&self) -> ManuallyDrop; | ------------ | | | the method is available for `Box>>` here | the method is available for `Arc>>` here | the method is available for `Rc>>` here | = note: the method `shallow_copy` exists but the following trait bounds were not satisfied: `Cell<()>: ShallowCopy` which is required by `Generic>: ShallowCopy` = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `shallow_copy`, perhaps you need to implement it: candidate #1: `ShallowCopy`