Files
rust/tests/ui/lint/issue-1866.rs

29 lines
614 B
Rust
Raw Normal View History

//@ build-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![warn(clashing_extern_declarations)]
mod a {
pub type rust_task = usize;
pub mod rustrt {
2013-06-22 14:43:15 -04:00
use super::rust_task;
2020-09-01 17:12:52 -04:00
extern "C" {
2014-06-25 12:47:34 -07:00
pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool;
}
}
}
mod b {
pub type rust_task = bool;
pub mod rustrt {
2013-06-22 14:43:15 -04:00
use super::rust_task;
2020-09-01 17:12:52 -04:00
extern "C" {
2014-06-25 12:47:34 -07:00
pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool;
2020-09-01 17:12:52 -04:00
//~^ WARN `rust_task_is_unwinding` redeclared with a different signature
}
}
}
2020-09-01 17:12:52 -04:00
pub fn main() {}