Closed
Description
To generate code for extern "C" fn foo()
, rustc
will create a Rust function and wrap it inside a function exposing the C ABI. This is bad for compile-time, but more importantly it makes it very hard to write functions like memset
, memcpy
and memmove
for freestanding Rust because LLVM will kindly replace their body with a call to the intrinsic, and then lower that to an infinitely recursive function.