Closed
Description
Code
extern "C" {
fn malloc(size: u32) -> *mut std::ffi::c_void;
}
fn main() {
unsafe { malloc(42) };
}
Meta
rustc 1.44.0-nightly (3712e11a8 2020-04-12) running on x86_64-unknown-linux-gnu
Error output
thread 'rustc' panicked at 'assertion failed: `(left == right)`
left: `8`,
right: `4`', /rustc/3712e11a828af2eea273a3e7300115e65833fbc5/src/libstd/macros.rs:16:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.44.0-nightly (3712e11a8 2020-04-12) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z always-encode-mir -Z mir-emit-retag -Z mir-opt-level=0 -C debug-assertions=on -C codegen-units=1 -C debuginfo=2 --crate-type bin
note: some of the compiler flags provided by cargo are hidden
error: could not compile `playground`.
To learn more, run the command again with --verbose.