Skip to content

extern "C" functions don't implement Clone #24161

Closed
@bfops

Description

@bfops

This should compile. It used to compile without deriving Clone, and it currently compiles if extern "C" is removed.

#[derive(Copy, Clone)]
struct Functions {
  pub foo: extern "C" fn(u32) -> u32,
}

fn main() {
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions