From 63e759c7c7e53975dcf852c6d06a4a5974c2ce7c Mon Sep 17 00:00:00 2001 From: jumbatm Date: Mon, 6 Apr 2020 19:58:16 +1000 Subject: [PATCH] Update #1866 test case. --- src/test/ui/issues/issue-1866.rs | 2 ++ src/test/ui/issues/issue-1866.stderr | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/test/ui/issues/issue-1866.stderr diff --git a/src/test/ui/issues/issue-1866.rs b/src/test/ui/issues/issue-1866.rs index e4fe26800eff3..668baefa5e4ad 100644 --- a/src/test/ui/issues/issue-1866.rs +++ b/src/test/ui/issues/issue-1866.rs @@ -1,6 +1,7 @@ // build-pass #![allow(dead_code)] #![allow(non_camel_case_types)] +#![warn(clashing_extern_decl)] // pretty-expanded FIXME #23616 @@ -20,6 +21,7 @@ mod b { use super::rust_task; extern { pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool; + //~^ WARN `rust_task_is_unwinding` redeclared with a different signature } } } diff --git a/src/test/ui/issues/issue-1866.stderr b/src/test/ui/issues/issue-1866.stderr new file mode 100644 index 0000000000000..d097287ad0c44 --- /dev/null +++ b/src/test/ui/issues/issue-1866.stderr @@ -0,0 +1,17 @@ +warning: `rust_task_is_unwinding` redeclared with a different signature + --> $DIR/issue-1866.rs:23:13 + | +LL | pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool; + | ------------------------------------------------------------ `rust_task_is_unwinding` previously declared here +... +LL | pub fn rust_task_is_unwinding(rt: *const rust_task) -> bool; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration + | +note: the lint level is defined here + --> $DIR/issue-1866.rs:4:9 + | +LL | #![warn(clashing_extern_decl)] + | ^^^^^^^^^^^^^^^^^^^^ + = note: expected `unsafe extern "C" fn(*const usize) -> bool` + found `unsafe extern "C" fn(*const bool) -> bool` +