Skip to content

Add a test to verify that TrustedPromise does not implement Clone #14500

@jdm

Description

@jdm

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>();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testingC-assignedThere is someone working on resolving the issueE-less-complexStraightforward. Recommended for a new contributor.I-safetySome piece of code violates memory safety guarantees.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions