2021-06-06 02:25:16 -05:00
|
|
|
#[no_mangle]
|
|
|
|
extern "C" fn malloc(_: usize) -> *mut std::ffi::c_void {
|
2022-07-11 06:44:55 -05:00
|
|
|
//~^ HELP: the `malloc` symbol is defined here
|
2021-06-06 02:25:16 -05:00
|
|
|
unreachable!()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
extern "C" {
|
|
|
|
fn malloc(_: usize) -> *mut std::ffi::c_void;
|
|
|
|
}
|
|
|
|
unsafe {
|
|
|
|
malloc(0);
|
2022-07-11 06:44:55 -05:00
|
|
|
//~^ ERROR: found `malloc` symbol definition that clashes with a built-in shim
|
2021-06-06 02:25:16 -05:00
|
|
|
}
|
|
|
|
}
|