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

30 lines
645 B
Rust
Raw Normal View History

// build-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![warn(clashing_extern_declarations)]
// pretty-expanded FIXME #23616
mod a {
pub type rust_task = usize;
pub mod rustrt {
2013-06-22 13:43:15 -05:00
use super::rust_task;
2020-09-01 16:12:52 -05:00
extern "C" {
2014-06-25 14:47:34 -05: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 13:43:15 -05:00
use super::rust_task;
2020-09-01 16:12:52 -05:00
extern "C" {
2014-06-25 14:47:34 -05:00
pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool;
2020-09-01 16:12:52 -05:00
//~^ WARN `rust_task_is_unwinding` redeclared with a different signature
}
}
}
2020-09-01 16:12:52 -05:00
pub fn main() {}