When no_mangle is present, cargo test fails like this (though there isn't even a test anywhere):
thread 'main' panicked at src/lib.rs:5:5:
assertion failed: args.is_aligned()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at library/core/src/panicking.rs:218:5:
panic in a function that cannot unwind
stack backtrace:
panicked at src/lib.rs:5:5:
assertion failed: args.is_aligned()
thread panicked while processing panic. aborting.
the symbol read is conflicting with libc, but apparently they have different type signature, so it is called with nonsense arguments.
remember, C symbols all exists in a global namespace and because they are not mangled with the type signature, it is common for C libraries to add prefixes to symbols (poor man's "namespace"), just to avoid conflicts like these.
I guess the error could have been better in that case, it wasn't immediately clear what is going on there. I'd expect some kind of linking error or something, but got runtime panic instead.