@@ -105,8 +105,20 @@ LL | fn draw_point(p: Point);
105105 = note: expected `unsafe extern "C" fn(sameish_members::a::Point)`
106106 found `unsafe extern "C" fn(sameish_members::b::Point)`
107107
108+ warning: `origin` redeclared with a different signature
109+ --> $DIR/clashing-extern-fn.rs:194:22
110+ |
111+ LL | extern "C" { fn origin() -> Point3; }
112+ | ---------------------- `origin` previously declared here
113+ ...
114+ LL | extern "C" { fn origin() -> Point3; }
115+ | ^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration
116+ |
117+ = note: expected `unsafe extern "C" fn() -> same_sized_members_clash::a::Point3`
118+ found `unsafe extern "C" fn() -> same_sized_members_clash::b::Point3`
119+
108120warning: `transparent_incorrect` redeclared with a different signature
109- --> $DIR/clashing-extern-fn.rs:195 :13
121+ --> $DIR/clashing-extern-fn.rs:217 :13
110122 |
111123LL | fn transparent_incorrect() -> T;
112124 | -------------------------------- `transparent_incorrect` previously declared here
@@ -118,7 +130,7 @@ LL | fn transparent_incorrect() -> isize;
118130 found `unsafe extern "C" fn() -> isize`
119131
120132warning: `missing_return_type` redeclared with a different signature
121- --> $DIR/clashing-extern-fn.rs:213 :13
133+ --> $DIR/clashing-extern-fn.rs:235 :13
122134 |
123135LL | fn missing_return_type() -> usize;
124136 | ---------------------------------- `missing_return_type` previously declared here
@@ -130,7 +142,7 @@ LL | fn missing_return_type();
130142 found `unsafe extern "C" fn()`
131143
132144warning: `non_zero_usize` redeclared with a different signature
133- --> $DIR/clashing-extern-fn.rs:231 :13
145+ --> $DIR/clashing-extern-fn.rs:253 :13
134146 |
135147LL | fn non_zero_usize() -> core::num::NonZeroUsize;
136148 | ----------------------------------------------- `non_zero_usize` previously declared here
@@ -142,7 +154,7 @@ LL | fn non_zero_usize() -> usize;
142154 found `unsafe extern "C" fn() -> usize`
143155
144156warning: `non_null_ptr` redeclared with a different signature
145- --> $DIR/clashing-extern-fn.rs:233 :13
157+ --> $DIR/clashing-extern-fn.rs:255 :13
146158 |
147159LL | fn non_null_ptr() -> core::ptr::NonNull<usize>;
148160 | ----------------------------------------------- `non_null_ptr` previously declared here
@@ -154,7 +166,7 @@ LL | fn non_null_ptr() -> *const usize;
154166 found `unsafe extern "C" fn() -> *const usize`
155167
156168warning: `option_non_zero_usize_incorrect` redeclared with a different signature
157- --> $DIR/clashing-extern-fn.rs:259 :13
169+ --> $DIR/clashing-extern-fn.rs:281 :13
158170 |
159171LL | fn option_non_zero_usize_incorrect() -> usize;
160172 | ---------------------------------------------- `option_non_zero_usize_incorrect` previously declared here
@@ -166,7 +178,7 @@ LL | fn option_non_zero_usize_incorrect() -> isize;
166178 found `unsafe extern "C" fn() -> isize`
167179
168180warning: `option_non_null_ptr_incorrect` redeclared with a different signature
169- --> $DIR/clashing-extern-fn.rs:261 :13
181+ --> $DIR/clashing-extern-fn.rs:283 :13
170182 |
171183LL | fn option_non_null_ptr_incorrect() -> *const usize;
172184 | --------------------------------------------------- `option_non_null_ptr_incorrect` previously declared here
@@ -177,5 +189,5 @@ LL | fn option_non_null_ptr_incorrect() -> *const isize;
177189 = note: expected `unsafe extern "C" fn() -> *const usize`
178190 found `unsafe extern "C" fn() -> *const isize`
179191
180- warning: 14 warnings emitted
192+ warning: 15 warnings emitted
181193
0 commit comments