E4140

E4140#

Invalid C function name in extern "C" declaration.

When binding a C function with the extern "C" declaration, the function name must be a valid C identifier. This means that the name must satisfy the following regex:

[a-zA-Z_$][a-zA-Z0-9_$]*

Erroneous example#

pub extern "C" fn f1() = "1"

Suggestion#

Change the function name to a valid C identifier:

pub extern "C" fn f1() = "f1"