rust/src/test/ui/issues/issue-5791.rs
jumbatm c72a5dd9d3 Rename the lint to clashing_extern_declarations.
Also, run RustFmt on the clashing_extern_fn test case and update
stderrs.
2020-06-28 10:11:29 +10:00

14 lines
350 B
Rust

// run-pass
#![allow(dead_code)]
#![warn(clashing_extern_declarations)]
// pretty-expanded FIXME #23616
extern {
#[link_name = "malloc"]
fn malloc1(len: i32) -> *const u8;
#[link_name = "malloc"]
//~^ WARN `malloc2` redeclares `malloc` with a different signature
fn malloc2(len: i32, foo: i32) -> *const u8;
}
pub fn main () {}