File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1
1
// build-pass
2
2
#![ allow( dead_code) ]
3
3
#![ allow( non_camel_case_types) ]
4
+ #![ warn( clashing_extern_decl) ]
4
5
5
6
// pretty-expanded FIXME #23616
6
7
@@ -20,6 +21,7 @@ mod b {
20
21
use super :: rust_task;
21
22
extern {
22
23
pub fn rust_task_is_unwinding ( rt : * const rust_task ) -> bool ;
24
+ //~^ WARN `rust_task_is_unwinding` redeclared with a different signature
23
25
}
24
26
}
25
27
}
Original file line number Diff line number Diff line change
1
+ warning: `rust_task_is_unwinding` redeclared with a different signature
2
+ --> $DIR/issue-1866.rs:23:13
3
+ |
4
+ LL | pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool;
5
+ | ------------------------------------------------------------ `rust_task_is_unwinding` previously declared here
6
+ ...
7
+ LL | pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool;
8
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
9
+ |
10
+ note: the lint level is defined here
11
+ --> $DIR/issue-1866.rs:4:9
12
+ |
13
+ LL | #![warn(clashing_extern_decl)]
14
+ | ^^^^^^^^^^^^^^^^^^^^
15
+ = note: expected `unsafe extern "C" fn(*const usize) -> bool`
16
+ found `unsafe extern "C" fn(*const bool) -> bool`
17
+
You can’t perform that action at this time.
0 commit comments