Skip to content

Commit 63e759c

Browse files
committed
Update rust-lang#1866 test case.
1 parent 0108116 commit 63e759c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/test/ui/issues/issue-1866.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// build-pass
22
#![allow(dead_code)]
33
#![allow(non_camel_case_types)]
4+
#![warn(clashing_extern_decl)]
45

56
// pretty-expanded FIXME #23616
67

@@ -20,6 +21,7 @@ mod b {
2021
use super::rust_task;
2122
extern {
2223
pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool;
24+
//~^ WARN `rust_task_is_unwinding` redeclared with a different signature
2325
}
2426
}
2527
}

src/test/ui/issues/issue-1866.stderr

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+

0 commit comments

Comments
 (0)