-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add a test to verify that TrustedPromise does not implement Clone #14500
Copy link
Copy link
Closed
Labels
A-testingC-assignedThere is someone working on resolving the issueThere is someone working on resolving the issueE-less-complexStraightforward. Recommended for a new contributor.Straightforward. Recommended for a new contributor.I-safetySome piece of code violates memory safety guarantees.Some piece of code violates memory safety guarantees.
Description
It is not a safe operation to clone a TrustedPromise, but it's really easy to derive Clone on the type and make it possible. We should add a test in https://dxr.mozilla.org/servo/source/tests/compiletest/plugin/compile-fail like:
fn cloneable<T: Clone>() {
}
fn main() {
cloneable::<TrustedPromise>();
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-testingC-assignedThere is someone working on resolving the issueThere is someone working on resolving the issueE-less-complexStraightforward. Recommended for a new contributor.Straightforward. Recommended for a new contributor.I-safetySome piece of code violates memory safety guarantees.Some piece of code violates memory safety guarantees.